Dschungelabenteuer / vite-plugin-entry-shaking

Mimic tree-shaking behaviour when importing code from an entry file in development mode.
MIT License
124 stars 8 forks source link

Doesn't work in build mode #4

Closed shayded-exe closed 1 year ago

shayded-exe commented 2 years ago

When I run this in build mode, it still removes the exports from the index files.

This of course causes rollup error complaining about missing exports.

The plugin should only apply itself during dev like this: https://vitejs.dev/guide/using-plugins.html#conditional-application

Dschungelabenteuer commented 2 years ago

Hey! Thank you for bringing that to my attention and directly pointing me at the right direction on Vite's documentation, appreciated! I've already released a patch addressing this issue, and since then released a minor version. Would you mind upgrading to 0.1.0 and let me know if it fixes the issue on your side? Thank you!