Skip to content

Commit

Permalink
fix(scripts): Fix the way webpack is naming the bundles (v3 -> v4 dif…
Browse files Browse the repository at this point in the history
…ferences) (#17977)
  • Loading branch information
Bouncey authored and raisedadead committed Aug 4, 2018
1 parent 993958d commit e3247b4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -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*
Expand Down
2 changes: 1 addition & 1 deletion server/views/layout-news.jade
Expand Up @@ -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')))
2 changes: 1 addition & 1 deletion server/views/layout-react.jade
Expand Up @@ -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')))
7 changes: 3 additions & 4 deletions webpack.config.js
Expand Up @@ -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: [
Expand Down

0 comments on commit e3247b4

Please sign in to comment.