underfin / vite-plugin-vue2

Vue2 plugin for Vite
621 stars 84 forks source link

fix: add pure annotations for tree shaking support #105

Closed mdoesburg closed 3 years ago

mdoesburg commented 3 years ago

Fixes: https://github.com/underfin/vite-plugin-vue2/issues/104

This is a similar fix to what is done here in vue-component-compiler. Except I also had to add an IIFE with a pure annotation around the default export otherwise it still wouldn't get dropped when it was unused.