From f9584fc810296d7ed97f68af2c346de312d24de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Chopin?= Date: Sun, 11 Jun 2017 21:12:51 +0200 Subject: [PATCH] Update example --- examples/custom-build/nuxt.config.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/examples/custom-build/nuxt.config.js b/examples/custom-build/nuxt.config.js index 22ba1217a6..5feedeaaef 100644 --- a/examples/custom-build/nuxt.config.js +++ b/examples/custom-build/nuxt.config.js @@ -7,21 +7,13 @@ module.exports = { app: 'app.[chunkhash].js' // default: nuxt.bundle.[chunkhash].js }, 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 }) { if (dev) { 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 } } }