-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vanilla-extract/vite-plugin v4.0.4 does not work with custom TS paths/aliases in Astro #1336
Comments
Seems like we've made our vite plugin too vite-specific. vanilla-extract/packages/vite-plugin/src/index.ts Lines 119 to 126 in dc5ace2
We're attempting to load a vite config from a file, which doesn't exist in an astro project, so we end up with a null configFile , so we pass no vite plugins to our vite-node compiler, which causes this error (and likely other issues).
I suppose we have a few options:
|
solidjs/solid-start is also moving away from |
same issue, Are there any plans that have been decided? |
@tomahl I just tested it with your reproduction and it seems the fix doesn't work. Need to dig into it further. |
Tested the fix in #1395 in your reproduction and it solves the issue. |
Describe the bug
Hello there,
It seems like the latest vite-plugin version doesn't handle custom paths in Astro anymore. A clean install of Astro (v4.4.9), VE (v1.14.1) throws error on first run when using custom paths:
FailedToLoadModuleSSR Could not import file. Could not import @tokens/colors.
Worked fine with the previous version.
Reproduction
https://stackblitz.com/edit/withastro-astro-7asckv?file=tsconfig.json,src%2Fstyles%2Fglobal.css.ts,src%2Flayouts%2FLayout.astro
System Info
Used Package Manager
npm
Logs
Validations
The text was updated successfully, but these errors were encountered: