Add manifest

This commit is contained in:
Sébastien Chopin 2017-03-26 00:52:39 +01:00
parent 494364604d
commit 617999a60a
2 changed files with 6 additions and 0 deletions

View File

@ -47,6 +47,7 @@ const defaults = {
analyze: false,
publicPath: '/_nuxt/',
filenames: {
manifest: 'manifest.[hash].js',
vendor: 'vendor.bundle.[hash].js',
app: 'nuxt.bundle.[chunkhash].js'
},

View File

@ -56,6 +56,11 @@ export default function () {
name: 'vendor',
filename: this.options.build.filenames.vendor
}),
// Extract manifest
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
filename: this.options.build.filenames.manifest
}),
// Generate output HTML
new HTMLPlugin({
template: this.options.appTemplatePath