Closed
Description
Vue version
3.5.13
Link to minimal reproduction
https://stackblitz.com/edit/vitejs-vite-sr5itbdf
Steps to reproduce
npm install
npm run build
NotTreeShaken
component exists indist/assets/index-xxx.js
What is expected?
NotTreeShaken
component is not imported, so it should be tree-shaken
What is actually happening?
NotTreeShaken
component exists in dist/assets/index-xxx.js
System Info
System:
OS: Linux 5.0 undefined
CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 0 Bytes / 0 Bytes
Shell: 1.0 - /bin/jsh
Binaries:
Node: 18.20.3 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.3 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/bin/pnpm
npmPackages:
vue: ^3.5.13 => 3.5.13
Any additional comments?
In the case of Props Destructure
, it is tree-shaken.
In the case of withDefaults, props are compiled as follows:
props: {
msg: { type: String, required: false, default: format('Hello World!!! ') }
},
In the case of Props Destructure, it is compiled as follows:
props: {
msg: { type: String, required: false, default: () => (format('Hello World!!! ')) }
},
Metadata
Metadata
Assignees
Labels
No labels