From 919b88509ceb48af46f2c8b2ac343ec3b0c380e4 Mon Sep 17 00:00:00 2001 From: Sayuti Daniel Date: Sun, 5 Aug 2018 01:18:20 +0700 Subject: [PATCH] Let webpack handle contenthash (#4895) --- build/webpack.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/webpack.js b/build/webpack.js index 07212c09..8e7439a0 100644 --- a/build/webpack.js +++ b/build/webpack.js @@ -158,7 +158,7 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, i filename: ({chunk}) => { // Use `[name]-[contenthash].js` in production if (!dev && (chunk.name === CLIENT_STATIC_FILES_RUNTIME_MAIN || chunk.name === CLIENT_STATIC_FILES_RUNTIME_WEBPACK)) { - return chunk.name.replace(/\.js$/, '-' + chunk.contentHash.javascript + '.js') + return chunk.name.replace(/\.js$/, '-[contenthash].js') } return '[name]' },