mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
improve webpack chunk namings
This commit is contained in:
parent
db19b50a02
commit
e510136a5a
@ -119,10 +119,11 @@ export default function webpackClientConfig () {
|
||||
// Add friendly error plugin
|
||||
config.plugins.push(new FriendlyErrorsWebpackPlugin())
|
||||
|
||||
// https://webpack.js.org/plugins/named-modules-plugin
|
||||
config.plugins.push(new webpack.NamedModulesPlugin())
|
||||
|
||||
// Add HMR support
|
||||
config.entry.app = ['webpack-hot-middleware/client?name=$client&reload=true', config.entry.app]
|
||||
config.output.filename = '[name].js'
|
||||
config.output.chunkFilename = '[id].js'
|
||||
config.plugins.push(
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.NoEmitOnErrorsPlugin()
|
||||
@ -143,6 +144,9 @@ export default function webpackClientConfig () {
|
||||
})
|
||||
)
|
||||
|
||||
// https://webpack.js.org/plugins/hashed-module-ids-plugin
|
||||
config.plugins.push(new webpack.HashedModuleIdsPlugin())
|
||||
|
||||
// Webpack Bundle Analyzer
|
||||
if (this.options.build.analyze) {
|
||||
config.plugins.push(
|
||||
|
@ -159,9 +159,9 @@ Options.defaults = {
|
||||
filenames: {
|
||||
css: 'common.[contenthash].css',
|
||||
manifest: 'manifest.[hash].js',
|
||||
vendor: 'vendor.bundle.[chunkhash].js',
|
||||
app: 'nuxt.bundle.[chunkhash].js',
|
||||
chunk: '[id].nuxt.bundle.[chunkhash].js'
|
||||
vendor: 'vendor.[chunkhash].js',
|
||||
app: 'app.[chunkhash].js',
|
||||
chunk: '[name].[chunkhash].js'
|
||||
},
|
||||
vendor: [],
|
||||
plugins: [],
|
||||
|
Loading…
Reference in New Issue
Block a user