bug: v6, custom elements, vite including old stencil lazy loading code
See original GitHub issuePrequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
Current Behavior
when trying to create fresh project with vite and ionic 6 beta i got this :
1827| return module[exportName];
1828| }
1829| return import(
| ^
1830| /* webpackInclude: /\.entry\.js$/ */
1831| /* webpackExclude: /\.system\.entry\.js$/ */
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
Expected Behavior
Since you said it work only for vue here : https://github.com/ionic-team/ionic-framework/issues/23671#issuecomment-884890552
i give a try like we can read here : https://dev.to/aaronksaunders/getting-started-with-vitejs-ionic-framework-beta-v6-and-vuejs-2o8l and this https://github.com/riderx/ionicv6-beta-vue-vite doesn’t work in my end
Steps to Reproduce
you can clone this : https://github.com/riderx/ionicv6-beta-vue-vite
and do npm i
then npm run dev
with node 16
Code Reproduction URL
https://github.com/riderx/ionicv6-beta-vue-vite
Ionic Info
Ionic:
Ionic CLI : 6.17.0
Utility:
cordova-res (update available: 0.15.3) : 0.15.2
native-run : 1.4.0
System:
NodeJS : v16.7.0
npm : 7.20.3
OS : macOS Monterey
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:16 (5 by maintainers)
Top Results From Across the Web
Custom Elements - Stencil.js
The dist-custom-elements builds each component as a stand-alone class that extends HTMLElement . The output is a standardized custom element with the styles ......
Read more >Lazy-load React components in Remix by sergiodxa
Suppose we want to create a timeline component that lists different events. Each event type has a unique com... Published on sergiodxa.com.
Read more >Unable to load stencil components lib with Vue3 using Vite
It appears that node_modules/. vite is the directory where Vite's dependency pre-bundling feature caches things.
Read more >Ionic v6 beta release - Mastering Ionic
Ionic Framework v6 will ship with what is being termed a Custom Elements Build. This simply refers to not using Stencil's lazy loading...
Read more >@ionic/core | Yarn - Package Manager
... fast, top-quality cross-platform native and Progressive Web Apps from a single codebase with JavaScript and the Web. Ionic is based on Web...
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
+1 for official /* @vite-ignore */
You can avoid this warning using
patch-package
.package.json
Edit
node_modules/@stencil/core/internal/client/index.js
. Add/* @vite-ignore */
.Create patch and re-install.