Unverified Commit 050d4f3f authored by Andrey Azov's avatar Andrey Azov Committed by GitHub
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
......@@ -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']
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment