summaryrefslogtreecommitdiff
path: root/config/webpack.config.js
diff options
context:
space:
mode:
authorKushal Pandya <kushalspandya@gmail.com>2019-07-31 09:02:48 +0000
committerKushal Pandya <kushalspandya@gmail.com>2019-07-31 09:02:48 +0000
commit4b2ea22caf5d5a2f72ce5a590f5264cd45c3eb38 (patch)
tree7bf1db29cf8e32f31920d4147225daa36b64f417 /config/webpack.config.js
parent8702dbcda312547dad937f63b88939ade5f0c5df (diff)
parentb0ba7c72de0a864b01ec1c4be626a8a233a9009f (diff)
downloadgitlab-ce-4b2ea22caf5d5a2f72ce5a590f5264cd45c3eb38.tar.gz
Merge branch 'mg-update-icons-svg-import' into 'master'
Use file-loader for sprite icons within icon.vue See merge request gitlab-org/gitlab-ce!31257
Diffstat (limited to 'config/webpack.config.js')
-rw-r--r--config/webpack.config.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/config/webpack.config.js b/config/webpack.config.js
index 4b6a9e4b99e..442b4b4c21e 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -90,6 +90,12 @@ const alias = {
// the following resolves files which are different between CE and EE
ee_else_ce: path.join(ROOT_PATH, 'app/assets/javascripts'),
+
+ // override loader path for icons.svg so we do not duplicate this asset
+ '@gitlab/svgs/dist/icons.svg': path.join(
+ ROOT_PATH,
+ 'app/assets/javascripts/lib/utils/icons_path.js',
+ ),
};
if (IS_EE) {
@@ -158,7 +164,15 @@ module.exports = {
loader: 'graphql-tag/loader',
},
{
+ test: /icons\.svg$/,
+ loader: 'file-loader',
+ options: {
+ name: '[name].[hash:8].[ext]',
+ },
+ },
+ {
test: /\.svg$/,
+ exclude: /icons\.svg$/,
loader: 'raw-loader',
},
{