Nuxt/examples/custom-build/nuxt.config.js

27 lines
597 B
JavaScript
Raw Normal View History

module.exports = {
build: {
filenames: {
css: 'app.css', // default: style.css
vendor: 'vendor.js', // default: vendor.bundle.js
app: 'app.js' // default: nuxt.bundle.js
},
vendor: ['lodash'],
// Loaders config (Webpack 2)
loaders: [
{
test: /\.(png|jpg|gif|svg)$/,
2016-11-16 16:55:15 +00:00
loader: 'url-loader',
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)
}
}
}
}