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.2.26
stackblitz.com
import * as tree from './tree-shaking2'
{{ tree.used2() }}
Only tree.used2() will be found in bundle
tree.used2()
All exports from 'tree-shaking2.ts', even those not used, like tree.notUsed2() will be present in bundle.
tree.notUsed2()
Dig in sfc compiler.
Possible cause:
tree
maybeRef
unref
unref(tree).used2()
unref()
The text was updated successfully, but these errors were encountered:
8a123ac
fix(compiler-sfc): fix treeshaking of namespace import when used in t…
12e8caf
…emplate fix vuejs#5209
No branches or pull requests
Version
3.2.26
Reproduction link
stackblitz.com
Steps to reproduce
import * as tree from './tree-shaking2'
{{ tree.used2() }}
What is expected?
Only
tree.used2()
will be found in bundleWhat is actually happening?
All exports from 'tree-shaking2.ts', even those not used, like
tree.notUsed2()
will be present in bundle.Dig in sfc compiler.
Possible cause:
tree
asmaybeRef
, hitting theunref
logic.tree.used2()
turns intounref(tree).used2()
.unref()
call breaks tree shaking.The text was updated successfully, but these errors were encountered: