mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
feat(nuxt.config.js): support chunkFileName in config
This commit is contained in:
parent
8682aa2d01
commit
f22c16a7a4
@ -35,6 +35,7 @@ export default function webpackBaseConfig ({ isClient, isServer }) {
|
||||
output: {
|
||||
path: resolve(this.options.buildDir, 'dist'),
|
||||
filename: this.options.build.filenames.app,
|
||||
chunkFilename: this.options.build.filenames.chunk,
|
||||
publicPath: (isUrl(this.options.build.publicPath)
|
||||
? this.options.build.publicPath
|
||||
: urlJoin(this.options.router.base, this.options.build.publicPath))
|
||||
|
@ -122,6 +122,7 @@ export default function webpackClientConfig () {
|
||||
// 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()
|
||||
|
@ -104,7 +104,8 @@ Options.defaults = {
|
||||
css: 'common.[chunkhash].css',
|
||||
manifest: 'manifest.[hash].js',
|
||||
vendor: 'vendor.bundle.[chunkhash].js',
|
||||
app: 'nuxt.bundle.[chunkhash].js'
|
||||
app: 'nuxt.bundle.[chunkhash].js',
|
||||
chunk: '[id].nuxt.bundle.[chunkhash].js'
|
||||
},
|
||||
vendor: [],
|
||||
plugins: [],
|
||||
|
Loading…
Reference in New Issue
Block a user