Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-web
ensembl-client
Commits
050d4f3f
Unverified
Commit
050d4f3f
authored
Aug 06, 2021
by
Andrey Azov
Committed by
GitHub
Aug 06, 2021
Browse files
Fix assets pipeline for svg files linked from scss files (#547)
parent
8017ad67
Pipeline
#182406
passed with stages
in 4 minutes and 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
src/ensembl/webpack/client/common.ts
src/ensembl/webpack/client/common.ts
+10
-0
No files found.
src/ensembl/webpack/client/common.ts
View file @
050d4f3f
...
...
@@ -70,10 +70,20 @@ export default (env: Record<string, unknown>): Configuration => {
]
},
{
test
:
/
\.
svg$/i
,
issuer
:
/
\.
scss$/
,
type
:
'
asset/resource
'
,
generator
:
{
filename
:
'
images/[name].[hash][ext]
'
}
},
// use file-loader on svg's (to be able to require them as a path to the image),
// but also use @svgr/webpack to be able to require svg's directly as React components
{
test
:
/
\.
svg$/
,
issuer
:
{
not
:
[
/
\.
scss$/
s
]
},
use
:
[
'
@svgr/webpack
'
,
'
file-loader
'
]
}
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment