Skip to content

Commit 09305db

Browse files
sirlancelothaoqunjiang
authored andcommitted
chore: add module concatenation hint (vuejs#2503)
Allow Webpack to process this file as an ES Module, which allows concatenating using ModuleConcatenationPlugin, resulting in a slightly smaller bundle and removes the overhead of a runtime `require()`. The export default null will get optimized away during tree-shaking.
1 parent c46d9cf commit 09305db

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/@vue/cli-service/lib/commands/build/setPublicPath.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ if (typeof window !== 'undefined') {
66
__webpack_public_path__ = i[1] // eslint-disable-line
77
}
88
}
9+
10+
// Indicate to webpack that this file can be concatenated
11+
export default null

0 commit comments

Comments
 (0)