mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-14 10:04:05 +00:00
Update example
This commit is contained in:
parent
2913d90109
commit
76a1969da1
@ -7,21 +7,13 @@ module.exports = {
|
|||||||
app: 'app.[chunkhash].js' // default: nuxt.bundle.[chunkhash].js
|
app: 'app.[chunkhash].js' // default: nuxt.bundle.[chunkhash].js
|
||||||
},
|
},
|
||||||
vendor: ['lodash'],
|
vendor: ['lodash'],
|
||||||
// Loaders config (Webpack 2)
|
|
||||||
loaders: [
|
|
||||||
{
|
|
||||||
test: /\.(png|jpg|gif|svg)$/,
|
|
||||||
loader: 'url-loader',
|
|
||||||
options: {
|
|
||||||
limit: 100000, // 100KO
|
|
||||||
name: 'img/[name].[ext]?[hash]'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
extend (config, { dev }) {
|
extend (config, { dev }) {
|
||||||
if (dev) {
|
if (dev) {
|
||||||
config.devtool = (dev ? 'eval-source-map' : false)
|
config.devtool = (dev ? 'eval-source-map' : false)
|
||||||
}
|
}
|
||||||
|
const urlLoader = config.module.rules.find((loader) => loader.loader === 'url-loader')
|
||||||
|
// Increase limit to 100KO
|
||||||
|
urlLoader.query.limit = 100000
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user