From 09305db48fbc57a7222aa1be0015e95ea2125360 Mon Sep 17 00:00:00 2001 From: Matthew Pietz Date: Fri, 14 Sep 2018 10:33:47 -0700 Subject: [PATCH] chore: add module concatenation hint (#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. --- packages/@vue/cli-service/lib/commands/build/setPublicPath.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/@vue/cli-service/lib/commands/build/setPublicPath.js b/packages/@vue/cli-service/lib/commands/build/setPublicPath.js index c83fbcad0..ccf422243 100644 --- a/packages/@vue/cli-service/lib/commands/build/setPublicPath.js +++ b/packages/@vue/cli-service/lib/commands/build/setPublicPath.js @@ -6,3 +6,6 @@ if (typeof window !== 'undefined') { __webpack_public_path__ = i[1] // eslint-disable-line } } + +// Indicate to webpack that this file can be concatenated +export default null