flow
flow copied to clipboard
[Vite] Iron-icon doesn't work, due to a problem in esbuild
Everything that depends on Polymer doesn't quite work well with Vite, but everything that is not iron-icon, there's an workaround for it.
Vaadin components that are based on Polymer don't have circular dependencies, so they happen to work without issues.
Reference: https://github.com/evanw/esbuild/issues/399
I tried to use Vite + an iron-icon in my Fusion project and didn't get any trouble with it. The icon was displayed on the page as well as no warnings by Vite. Perhaps it was already fixed at some point?
I also tried to build the app in production mode and everything worked all the same fine.
I created this very basic example so you could see it for yourself: https://stackblitz.com/edit/vitejs-vite-nbknhm?file=main.js
Am I missing some context?
The related Vite issue is https://github.com/vitejs/vite/issues/5142