Build Error: [rollup-plugin-dynamic-import-variables] Unexpected token
See original GitHub issue⚠️ IMPORTANT ⚠️ Please do not ignore this template. If you do, your issue will be closed immediately.
- Read the docs.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
Describe the bug
can no build this project
Reproduction
https://github.com/HenryWong-fe/vite-project
System Info
vite
version: ^2.0.0- Operating System: mac os 10.15.4
- Node version: v14.15.1
- Package manager (npm/yarn/pnpm) and version: npm 6.14.8
Logs (Optional if provided reproduction)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:18 (2 by maintainers)
Top Results From Across the Web
"[rollup-plugin-dynamic-import-variables] Unexpected token ...
I've make a simple GSAP and ScrollTrigger animation for my website, but when I build it with Vite JS (which uses rollup to...
Read more >Production Build [rollup-plugin-dynamic-import-variables ...
I'm facing one issue on production build only on netlify. If I execute production build in my local it's works perfect. Here is...
Read more >0 1 "[rollup-plugin-dynamic-import-variables] Unexpected ...
I am building vite js app (click here to download code) and when I try and build with the command: npm run build....
Read more >Rollup-plugin-dynamic-import-variables - npm.io
This glob pattern is evaluated during the build, and any files found are added to the rollup bundle. At runtime, the correct import...
Read more >vite-plugin-dynamic-import - npm
Enhance Vite builtin dynamic import. Latest version: 1.2.4, last published: a month ago. Start using vite-plugin-dynamic-import in your ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m facing the same issue too while running
npm run build
If you happen to be running into this with Svelte, a workaround was suggested here. I was getting build errors on .svelte pages that have a style tag and use an environmental variable via import.meta.env.