2016-11-09 01:35:13 +00:00
|
|
|
module.exports = {
|
|
|
|
build: {
|
|
|
|
filenames: {
|
2017-04-30 12:54:14 +00:00
|
|
|
css: 'styles.[chunkhash].css', // default: common.[chunkhash].css
|
2017-04-21 17:03:29 +00:00
|
|
|
manifest: 'manifest.[hash].js', // default: manifest.[hash].js
|
|
|
|
vendor: 'vendor.[hash].js', // default: vendor.bundle.[hash].js
|
|
|
|
app: 'app.[chunkhash].js' // default: nuxt.bundle.[chunkhash].js
|
2016-11-09 01:35:13 +00:00
|
|
|
},
|
|
|
|
vendor: ['lodash'],
|
|
|
|
// Loaders config (Webpack 2)
|
|
|
|
loaders: [
|
|
|
|
{
|
|
|
|
test: /\.(png|jpg|gif|svg)$/,
|
2016-11-16 16:55:15 +00:00
|
|
|
loader: 'url-loader',
|
2016-11-09 01:35:13 +00:00
|
|
|
options: {
|
|
|
|
limit: 100000, // 100KO
|
|
|
|
name: 'img/[name].[ext]?[hash]'
|
|
|
|
}
|
|
|
|
}
|
2016-12-27 15:30:33 +00:00
|
|
|
],
|
|
|
|
extend (config, { dev }) {
|
|
|
|
if (dev) {
|
|
|
|
config.devtool = (dev ? 'eval-source-map' : false)
|
|
|
|
}
|
|
|
|
}
|
2016-11-09 01:35:13 +00:00
|
|
|
}
|
|
|
|
}
|