fix(scripts): Fix the way webpack is naming the bundles (v3 -> v4 differences) (#17977)

This commit is contained in:
Stuart Taylor
2018-08-04 22:43:55 +01:00
committed by mrugesh mohapatra
parent 993958daea
commit e3247b4554
4 changed files with 7 additions and 6 deletions

2
.gitignore vendored
View File

@ -45,6 +45,8 @@ server/manifests/*
!server/manifests/README.md
server/resources/pathMigration.json
public/js/client*
public/js/news*
public/js/main*
public/js/commonFramework*
public/js/sandbox*

View File

@ -8,4 +8,4 @@ html(lang='en')
include partials/react-stylesheets
body
#news-app-mount!= markup
script(src=cacheBreaker(rev('/js', 'news-app.js')))
script(src=cacheBreaker(rev('/js', 'news.js')))

View File

@ -23,4 +23,4 @@ html(lang='en').full-size
fccTheme = null;
}
})();
script(src=cacheBreaker(rev('/js', 'client-app.js')))
script(src=cacheBreaker(rev('/js', 'client.js')))

View File

@ -22,10 +22,9 @@ module.exports = {
net: 'empty'
},
output: {
filename: __DEV__ ? '[name]-app.js' : '[name]-app-[hash].js',
chunkFilename: __DEV__ ? '[name]-chunk.js' : '[name]-chunk-[chunkhash].js',
path: path.join(__dirname, '/public/js/'),
publicPath: '/js'
filename: __DEV__ ? '[name].js' : '[name]-[hash].js',
chunkFilename: __DEV__ ? '[name].js' : '[name]-[chunkhash].js',
path: path.join(__dirname, '/public/js/')
},
module: {
rules: [