aboutsummaryrefslogtreecommitdiff
path: root/webpack.config.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-10-23 12:20:37 +0300
committerGravatar Vitaly Takmazov2019-10-23 12:20:37 +0300
commit40c7ecc9d502bd73f51a0b944214ad0c8e56da1f (patch)
tree715ac1ec48faefe72bd821aa418de5b790bda3d5 /webpack.config.js
parente728f7bb5cd0fc644b446f3343d368f7b6ea37b4 (diff)
Load icons from external SVG
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js19
1 files changed, 15 insertions, 4 deletions
diff --git a/webpack.config.js b/webpack.config.js
index cbce03f3..5ecc5eb5 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -25,8 +25,8 @@ module.exports = (env, argv) => {
'whatwg-fetch',
__dirname + '/src/main/assets/scripts.js',
__dirname + '/src/main/assets/style.css',
- require.resolve('evil-icons/assets/evil-icons.css'),
- require.resolve('evil-icons/assets/evil-icons.js')
+ require.resolve('evil-icons/assets/sprite.svg'),
+ require.resolve('evil-icons/assets/evil-icons.css')
]
},
output: {
@@ -54,8 +54,19 @@ module.exports = (env, argv) => {
}
]
},
- { test: /\.png$/, loader: 'url-loader' },
- { test: /\.svg$/, loader: 'url-loader' }
+ {
+ test: /\.(jpe?g|png|gif)$/i,
+ loaders: [
+ 'url-loader'
+ ]
+ },
+ {
+ test: /\.(svg)$/i,
+ loader: 'file-loader',
+ options: {
+ name: '[name].[ext]',
+ },
+ }
]
},
plugins: [