You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
im having trouble using this in None-Vue-Code (still nuxt3 but on the serverside)
importLogofrom"~/assets/logo.svg?raw"exportdefaultdefineEventHandler(async(event)=>{//do something with the logo here}
the error im getting:
ERROR Error: Could not load /.../assets/logo.svg?raw (imported by model/pdf.ts): ENOENT: no such file or directory, open '/.../assets/logo.svg?raw'
so i guess the loader is not active everywhere? i guess it should?
doing the same in a vue component works flawless!
using a different loader technique (none in this case):
import Logo from "~/assets/logo.svg"
WARN (inject plugin) rollup-plugin-inject: failed to parse /.../assets/logo.svg. Consider restricting the plugin to particular files via options.include 10:26:40 PM
ERROR RollupError: Expression expected (Note that you need plugins to import files that are not JavaScript) nitro 10:26:40 PM
1: <svg xmlns="http://www.w3.org/2000/svg" width="280" height="186" fill="none"><path fill="#0C4A6E" d="M20.25 175.65c.9...
^
The text was updated successfully, but these errors were encountered:
I'm thinking this issue might be tied to the nitro server, which seems to struggle with importing file types like .png and .svg. If we're looking to work with raw files on the server, it might be a good idea to look into using a file system package, such as fs or fs-extra.
im having trouble using this in None-Vue-Code (still nuxt3 but on the serverside)
the error im getting:
so i guess the loader is not active everywhere? i guess it should?
doing the same in a vue component works flawless!
using a different loader technique (
none
in this case):The text was updated successfully, but these errors were encountered: