You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chunk with PageOne contains only its code and TextField code
Chunk with PageTwo contains only its code and Form code
What is actually happening?
Chunk with PageOne contains code of both TextField and Form
Chunk with PageTwo contains code of both TextField and Form
Reproduction repository contains 4 branches:
master - allows to reproduce original issue
direct-import - both pages use direct imports of components, not from index file. And tree shaking works as it should. It proves that the bug is caused by re-export.
re-export-of-pure-ts - do the same as master branch, but without any vue related code. It uses dynamic imports and re-export and it works fine. It proves, that re-export of JS functions work as expected
re-export-of-ts-in-vue - do the same as master branch, but instead of re-export of vue components (TextField, Form), it re-export simple TS functions. Then these functions are imported in vue components. And tree shaking is still working.
It proves that tree shaking doesn't work exactly when we re-export .vue files
The text was updated successfully, but these errors were encountered:
Version
5.0.8
Reproduction link
github.com
Environment info
Steps to reproduce
master
branchnpm run build
css
andjs
chunks indist
folderWhat is expected?
PageOne
contains only its code andTextField
codePageTwo
contains only its code andForm
codeWhat is actually happening?
PageOne
contains code of bothTextField
andForm
PageTwo
contains code of bothTextField
andForm
Reproduction repository contains 4 branches:
master
- allows to reproduce original issuedirect-import
- both pages use direct imports of components, not fromindex
file. And tree shaking works as it should. It proves that the bug is caused by re-export.re-export-of-pure-ts
- do the same asmaster
branch, but without anyvue
related code. It uses dynamic imports and re-export and it works fine. It proves, that re-export of JS functions work as expectedre-export-of-ts-in-vue
- do the same asmaster
branch, but instead of re-export of vue components (TextField, Form), it re-export simple TS functions. Then these functions are imported in vue components. And tree shaking is still working.It proves that tree shaking doesn't work exactly when we re-export
.vue
filesThe text was updated successfully, but these errors were encountered: