Override icons.svg asset path with sprockets asset

This commit is contained in:
Mike Greiling 2019-07-29 15:25:59 -05:00
parent 7d68ac70aa
commit b0ba7c72de
No known key found for this signature in database
GPG Key ID: 0303DF507FA67596
2 changed files with 9 additions and 0 deletions

View File

@ -0,0 +1,3 @@
// any import of '@gitlab/svgs/dist/icons.svg' will be overridden with this
// to avoid asset duplication between sprockets and webpack
export default gon && gon.sprite_icons;

View File

@ -89,6 +89,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) {