flow icon indicating copy to clipboard operation
flow copied to clipboard

[Vite] Iron-icon doesn't work, due to a problem in esbuild

Open gilberto-torrezan opened this issue 2 years ago • 2 comments

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

gilberto-torrezan avatar Nov 03 '21 12:11 gilberto-torrezan

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?

vursen avatar Jan 26 '22 07:01 vursen

The related Vite issue is https://github.com/vitejs/vite/issues/5142

Artur- avatar Jan 26 '22 07:01 Artur-