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
[plugin:vite:import-analysis] Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.
~icons/mdi/alarm-off:1:571
Error: Failed to parse source for import analysis because the content contains invalid JS syntax. If you are using JSX, make sure to name the file with the .jsx or .tsx extension.
at formatError (/home/projects/unplugin-unplugin-icons-cmy9zp/node_modules/vite/dist/node/chunks/dep-68d1a114.js:44114:46)
at TransformContext.error (/home/projects/unplugin-unplugin-icons-cmy9zp/node_modules/vite/dist/node/chunks/dep-68d1a114.js:44110:19)
at TransformContext.transform (/home/projects/unplugin-unplugin-icons-cmy9zp/node_modules/vite/dist/node/chunks/dep-68d1a114.js:41836:22)
at async Object.transform (/home/projects/unplugin-unplugin-icons-cmy9zp/node_modules/vite/dist/node/chunks/dep-68d1a114.js:44404:30)
at async loadAndTransform (/home/projects/unplugin-unplugin-icons-cmy9zp/node_modules/vite/dist/node/chunks/dep-68d1a114.js:55078:29)
at async instantiateModule (/home/projects/unplugin-unplugin-icons-cmy9zp/node_modules/vite/dist/node/chunks/dep-68d1a114.js:56003:10
Commenting out the affected ?raw imports removes the error.
Describe the bug
Importing icon with
?raw
in SvelteKit results in error.This bug appears since version 0.17.4.
To reproduce:
Go to the official unplugin-icons SvelteKit playground, which immediately produces error:
Commenting out the affected
?raw
imports removes the error.Possible cause:
A change introduced in version 0.17.4 likely caused the issue.
v0.17.3...v0.17.4#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80
Reproduction
https://stackblitz.com/fork/github/unplugin/unplugin-icons/tree/main/examples/sveltekit
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: