Vite related issue
See original GitHub issueReproduction
Steps to reproduce the issue:
- Create any vite app
- Install and import library
import '@papyrs/stylo'
Error in terminal:
381| var ce = (e2) => {
382| const t2 = e2.h.replace(/-/g, "_"), n2 = e2.q, l2 = ie.get(n2);
383| return l2 ? l2[t2] : import(`./${n2}.entry.js`).then((e3) => (ie.set(n2, e3), e3[t2]), oe);
| ^
384| };
385| var re = /* @__PURE__ */ new Map();
The above dynamic import cannot be analyzed by vite.
See https://github.com/rollup/plugins/tree/master/packages/dynamic-import-vars#limitations for supported dynamic import formats.
If this is intended to be left as-is, you can use the /* @vite-ignore */ comment inside the import() call to suppress this warning.
Plugin: vite:import-analysis
File: /test-project/node_modules/.vite/@papyrs_stylo.js?v=ac2d9e89
Error in browser console:
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Issues · vitejs/vite - GitHub
Issues list ; Respect Browserslist config in esbuild · #11489 opened · ai ; support preload and prefetch of css · #11486 opened...
Read more >Troubleshooting - Vite
Requests are stalled forever #. If you are using Linux, file descriptor limits and inotify limits may be causing the issue. As Vite...
Read more >Common Issues - Nuxt Vite
Vite has an issue for pre-bundling dependencies with named exports (#56 ). ... Related to #7 , errors can happen while importing assets...
Read more >Problem with Vue3 Vite .env during development mode
VITE_SOME_KEY);. It's working after build and serve. But during development (npm run vite) i have problem: Module "process" has been ...
Read more >Troubleshooting | Vite Ruby
... and bugs introduced in the past. Please skim through before opening an issue. ... See above, it could be related to the...
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 needed a coffee, I think it works as following:
However doing so it won’t work without installing in addition
@stencil/core
as a dependency.There are several issues open at Ionic and Stencil about it. Until these are solved there is no cleaner way to import it in vite projects I think.
https://github.com/ionic-team/ionic-framework/issues/23823
https://github.com/ionic-team/stencil/issues/2826
https://github.com/ionic-team/stencil/pull/2959
This has been solved thanks to an improvement in StencilJS and released in
v0.0.38
See https://github.com/papyrs/stylo/releases/tag/v0.0.38