We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3.3.4
https://stackblitz.com/edit/vitejs-vite-3cmbr7?file=dist%2Fassets%2Findex-311591ca.js
npm run build
dist/assets/index-....js
NonTreeshakable
Component should be tree-shaken
Component isn't tree-shaken because it compiles to
/* @__PURE__ */ defineComponent({ __name: "NonTreeshakable", props: mergeDefaults({ prop1: { type: Boolean }, prop2: {} }, propsDefaults), setup(__props) { ... } });
mergeDefaults ends up being used at the top level and isn't marked as sideEffect-free.
mergeDefaults
No response
I ran into this after looking into why radix-vue seems way too large compared to how small my imported components are. Their PopperContent.vue leads to this exact problem.
PopperContent.vue
The text was updated successfully, but these errors were encountered:
fix(compiler-sfc): generate more treeshaking friendly code (#9507)
8d74ca0
close #9500
Successfully merging a pull request may close this issue.
Vue version
3.3.4
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-3cmbr7?file=dist%2Fassets%2Findex-311591ca.js
Steps to reproduce
npm run build
dist/assets/index-....js
and scroll to the bottomNonTreeshakable
What is expected?
Component should be tree-shaken
What is actually happening?
Component isn't tree-shaken because it compiles to
mergeDefaults
ends up being used at the top level and isn't marked as sideEffect-free.System Info
No response
Any additional comments?
I ran into this after looking into why radix-vue seems way too large compared to how small my imported components are.
Their
PopperContent.vue
leads to this exact problem.The text was updated successfully, but these errors were encountered: