vuejs / rollup-plugin-vue

Roll .vue files
https://vuejs.github.io/rollup-plugin-vue
MIT License
843 stars 148 forks source link

ESM output of vue class components not tree-shakeable in webpack #431

Open Robin-Hoodie opened 3 years ago

Robin-Hoodie commented 3 years ago

Version

5.1.9

Reproduction link

https://github.com/Robin-Hoodie/rollup-plugin-vue-treeshake-bug

Steps to reproduce

Follow steps described in README of https://github.com/Robin-Hoodie/rollup-plugin-vue-treeshake-bug

What is expected?

rollup-plugin-vue produces tree-shakeable output when outputting an ESM bundle

What is actually happening?

All components are included in consumer project, regardless of whether or not it actually uses them


This issue is highly related to https://github.com/vuejs/rollup-plugin-vue/issues/344 .

I used the reproduction repo provided by @mgdodge to reproduce that this is still an issue for components that use class syntax

youlinaa commented 3 years ago

same problem

Robin-Hoodie commented 3 years ago

Any updates on this, or any way we can help?