bug: Ionic doesn’t work with Vite (anything except webpack)

I’m trying to use Ionic in my app along with Vite.

But I’m getting a 404 http://localhost:3000/node_modules/.vite/ion-app_8.entry.js?import

You can try it out immediately here https://repl.it/@abdellah/vite-ionic-1 and here is its github repo https://github.com/haikyuu/vite-ionic

How can I use Vite with Ionic?

1 possible answer(s) on “bug: Ionic doesn’t work with Vite (anything except webpack)

  1. Thanks for the issue. The problem here is the fact that we rely on Stencil’s lazy loading solution as noted in #22924 (comment).

    We have a “Custom elements” build of Ionic Framework coming soon that does not use this lazy loading which will make the framework much easier to use with Rollup, Vite, etc. Keep an eye out for an announcement regarding this!

    I am going to close this issue in favor of ionic-team/stencil#2827.