example: update custom-build

This commit is contained in:
Clark Du 2018-07-18 17:16:01 +01:00
parent 2c92fddbdc
commit faa069df49
No known key found for this signature in database
GPG Key ID: 32CBD8CD478AF898
2 changed files with 12 additions and 4 deletions

View File

@ -9,9 +9,17 @@ export default {
if (isDev) { if (isDev) {
config.devtool = 'eval-source-map' config.devtool = 'eval-source-map'
} }
const urlLoader = config.module.rules.find((loader) => loader.loader === 'url-loader')
config.module.rules.some((loader) => {
if (loader.use) {
const urlLoader = loader.use.find(use => use.loader === 'url-loader')
if (urlLoader) {
// Increase limit to 100KO // Increase limit to 100KO
urlLoader.query.limit = 100000 urlLoader.options.limit = 100000
return true
}
}
})
} }
} }
} }

View File

@ -2,7 +2,7 @@
"name": "example-custom-build", "name": "example-custom-build",
"description": "", "description": "",
"dependencies": { "dependencies": {
"nuxt": "latest" "nuxt-edge": "latest"
}, },
"scripts": { "scripts": {
"dev": "nuxt", "dev": "nuxt",