eik-lib / issues

Issues and discussions that span all of Eik
https://eik.dev
1 stars 0 forks source link

Use with Vite #12

Closed pearofducks closed 2 years ago

pearofducks commented 3 years ago

It would be awesome if there was a way to use the Eik plugin with Vite (specifically @vitejs/plugin-vue). For some reason it seems like the Vue library gets resolved in some special way there, because it never hits the resolveId step of Eik's rollup plugin.

As of right now this means local development is done using Vite to get HMR and such, and then we switch to Rollup for building for prod. This works "mostly OK", but there's a few things like asset handling that aren't aligned and would be great to benefit from.

If there's anything I can do to facilitate, please let me know!

Reproduction here via npm run build: https://github.com/pearofducks/eik-vite-repro

trygve-lie commented 3 years ago

Getting Vite to work with Eik is definitely something we want. There might be some small difference from Rollup plugins to Vite but I'll dig into that.

pearofducks commented 2 years ago

Fixed!

https://github.com/pearofducks/viteik/blob/master/index.js