-
Notifications
You must be signed in to change notification settings - Fork 915
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: generate treeshaking friendly code
- Loading branch information
Showing
2 changed files
with
37 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// runtime helper for setting properties on components | ||
// in a tree-shakable way | ||
export default (sfc: any, props: [string, string][]) => { | ||
for (const [key, val] of props) { | ||
sfc[key] = val | ||
} | ||
return sfc | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11e3cb8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused: we got a an update to version 16.6.0 suggested by Renovate including this change but now there is no such release anymore? It's still on NPM though: https://www.npmjs.com/package/vue-loader/v/16.6.0
I noticed that this change breaks the SFC
<i18n>
block of https://github.com/intlify/vue-i18n-next in a Webpackproduction
build.11e3cb8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my report here: intlify/vue-i18n#680
Not sure if this needs to be fixed in
vue-18n
orvue-loader
.@yyx990803 Any ideas?
11e3cb8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change also seems to break compiling SVG files when using
vue-svg-loader
damianstasik/vue-svg-loader#136 (comment)