mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 22:25:12 +00:00
Merge branch 'dev' of github.com:nuxt/nuxt.js into dev
This commit is contained in:
commit
94d6bdc7b2
@ -35,6 +35,7 @@ export default function webpackBaseConfig ({ isClient, isServer }) {
|
|||||||
output: {
|
output: {
|
||||||
path: resolve(this.options.buildDir, 'dist'),
|
path: resolve(this.options.buildDir, 'dist'),
|
||||||
filename: this.options.build.filenames.app,
|
filename: this.options.build.filenames.app,
|
||||||
|
chunkFilename: this.options.build.filenames.chunk,
|
||||||
publicPath: (isUrl(this.options.build.publicPath)
|
publicPath: (isUrl(this.options.build.publicPath)
|
||||||
? this.options.build.publicPath
|
? this.options.build.publicPath
|
||||||
: urlJoin(this.options.router.base, this.options.build.publicPath))
|
: urlJoin(this.options.router.base, this.options.build.publicPath))
|
||||||
@ -105,6 +106,13 @@ export default function webpackBaseConfig ({ isClient, isServer }) {
|
|||||||
limit: 1000, // 1 KO
|
limit: 1000, // 1 KO
|
||||||
name: 'fonts/[name].[hash:7].[ext]'
|
name: 'fonts/[name].[hash:7].[ext]'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(webm|mp4)$/,
|
||||||
|
loader: 'file',
|
||||||
|
query: {
|
||||||
|
name: 'videos/[name].[hash:7].[ext]'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -122,6 +122,7 @@ export default function webpackClientConfig () {
|
|||||||
// Add HMR support
|
// Add HMR support
|
||||||
config.entry.app = ['webpack-hot-middleware/client?name=$client&reload=true', config.entry.app]
|
config.entry.app = ['webpack-hot-middleware/client?name=$client&reload=true', config.entry.app]
|
||||||
config.output.filename = '[name].js'
|
config.output.filename = '[name].js'
|
||||||
|
config.output.chunkFilename = '[id].js'
|
||||||
config.plugins.push(
|
config.plugins.push(
|
||||||
new webpack.HotModuleReplacementPlugin(),
|
new webpack.HotModuleReplacementPlugin(),
|
||||||
new webpack.NoEmitOnErrorsPlugin()
|
new webpack.NoEmitOnErrorsPlugin()
|
||||||
|
@ -104,7 +104,8 @@ Options.defaults = {
|
|||||||
css: 'common.[chunkhash].css',
|
css: 'common.[chunkhash].css',
|
||||||
manifest: 'manifest.[hash].js',
|
manifest: 'manifest.[hash].js',
|
||||||
vendor: 'vendor.bundle.[chunkhash].js',
|
vendor: 'vendor.bundle.[chunkhash].js',
|
||||||
app: 'nuxt.bundle.[chunkhash].js'
|
app: 'nuxt.bundle.[chunkhash].js',
|
||||||
|
chunk: '[id].nuxt.bundle.[chunkhash].js'
|
||||||
},
|
},
|
||||||
vendor: [],
|
vendor: [],
|
||||||
plugins: [],
|
plugins: [],
|
||||||
|
Loading…
Reference in New Issue
Block a user