diff --git a/webpack/webpack.common.js b/webpack/webpack.common.js index cc9de6ab1..eebd5b327 100644 --- a/webpack/webpack.common.js +++ b/webpack/webpack.common.js @@ -45,26 +45,7 @@ module.exports = { { loader: 'html-loader' } ] }, - { - test: /\.(woff|woff2|eot|ttf|svg|)$/, - use: [ - { - loader: 'url-loader', - options: { limit: 25000 } - } - ] - }, - { - test: /\.(ico|png|jpg|gif)$/, - use: [ - { - loader: 'url-loader', - options: { - limit: 25000 - } - } - ] - }, + { test: /.xml$/, use: 'file-loader' diff --git a/webpack/webpack.develop.js b/webpack/webpack.develop.js index f2b584968..8566ea38c 100644 --- a/webpack/webpack.develop.js +++ b/webpack/webpack.develop.js @@ -4,6 +4,19 @@ const commonConfig = require('./webpack.common.js'); module.exports = webpackMerge(commonConfig, { mode: 'development', + module: { + rules: [ + { + test: /\.(woff|woff2|eot|ttf|svg|ico|png|jpg|gif)$/, + use: [ + { + loader: 'file-loader', + // options: { limit: 25000 } + } + ] + } + ] + }, devServer: { contentBase: path.join(__dirname, '.tmp'), compress: true, diff --git a/webpack/webpack.production.js b/webpack/webpack.production.js index 364efc9ed..683d6f655 100644 --- a/webpack/webpack.production.js +++ b/webpack/webpack.production.js @@ -2,5 +2,18 @@ const webpackMerge = require('webpack-merge'); const commonConfig = require('./webpack.common.js'); module.exports = webpackMerge(commonConfig, { - mode: 'production' + mode: 'production', + module: { + rules: [ + { + test: /\.(woff|woff2|eot|ttf|svg|ico|png|jpg|gif)$/, + use: [ + { + loader: 'url-loader', + options: { limit: 25000 } + } + ] + }, + ] + } });