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

26 lines
719 B
JavaScript
Raw Normal View History

2018-03-16 16:12:06 +00:00
export default {
build: {
filenames: {
css: 'styles.[contenthash].css', // default: common.[contenthash].css
manifest: 'manifest.[contenthash].js', // default: manifest.[contenthash].js
app: 'app.[contenthash].js' // default: nuxt.bundle.[contenthash].js
},
extend (config, { isDev }) {
if (isDev) {
config.devtool = 'eval-source-map'
2016-12-27 15:30:33 +00:00
}
2018-07-18 16:16:01 +00:00
config.module.rules.some((loader) => {
if (loader.use) {
const urlLoader = loader.use.find(use => use.loader === 'url-loader')
if (urlLoader) {
// Increase limit to 100KO
urlLoader.options.limit = 100000
return true
}
}
})
2016-12-27 15:30:33 +00:00
}
}
}