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
My site works fine on v0.4.2. When I update to 0.5.1, astro dev runs without errors, but when I load a page on my site, I receive the following error page:
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.
virtual:starlight/user-images:1:188
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 (file:///Users/seanwright/dev/myproject/node_modules/vite/dist/node/chunks/dep-8609dc5d.js:43902:46)
at TransformContext.error (file:///Users/seanwright/dev/myproject/node_modules/vite/dist/node/chunks/dep-8609dc5d.js:43898:19)
at TransformContext.transform (file:///Users/seanwright/dev/myproject/node_modules/vite/dist/node/chunks/dep-8609dc5d.js:41655:22)
at async Object.transform (file:///Users/seanwright/dev/myproject/node_modules/vite/dist/node/chunks/dep-8609dc5d.js:44192:30)
at async loadAndTransform (file:///Users/seanwright/dev/myproject/node_modules/vite/dist/node/chunks/dep-8609dc5d.js:54827:29)
at async instantiateModule (file:///Users/seanwright/dev/myproject/node_modules/vite/dist/node/chunks/dep-8609dc5d.js:55752:10)
In the terminal I see the following:
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.
File:
virtual:starlight/user-images:1:188
Code:
1 | import dark from /src/assets/logo/dark-logo.svg; import light from /src/assets/logo/light-logo.svg; export const logos = { dark, light };
|
My logo svg files work just fine for light/dark mode in v0.4.2.
Link to Minimal Reproducible Example
No response
Participation
I am willing to submit a pull request for this issue.
The text was updated successfully, but these errors were encountered:
What version of
starlight
are you using?0.5.1
What version of
astro
are you using?2.8.3
What package manager are you using?
npm
What operating system are you using?
Mac
What browser are you using?
Brave, Safari
Describe the Bug
My site works fine on v0.4.2. When I update to 0.5.1,
astro dev
runs without errors, but when I load a page on my site, I receive the following error page:In the terminal I see the following:
My logo svg files work just fine for light/dark mode in v0.4.2.
Link to Minimal Reproducible Example
No response
Participation
The text was updated successfully, but these errors were encountered: