diff --git a/packages/scripts/CHANGELOG.md b/packages/scripts/CHANGELOG.md index adaf85dc90af5a..3ff2f06c87ae31 100644 --- a/packages/scripts/CHANGELOG.md +++ b/packages/scripts/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Bug Fixes + +- Bring back support for SVG files in CSS ([#34394](https://github.com/WordPress/gutenberg/pull/34394)). It wasn't correctly migrated when integrating webpack v5. + ## 18.0.0 (2021-08-23) ### Breaking Changes diff --git a/packages/scripts/config/webpack.config.js b/packages/scripts/config/webpack.config.js index 86ed99807d8815..5bbc0a43e18b90 100644 --- a/packages/scripts/config/webpack.config.js +++ b/packages/scripts/config/webpack.config.js @@ -184,9 +184,15 @@ const config = { }, { test: /\.svg$/, + issuer: /\.jsx?$/, use: [ '@svgr/webpack', 'url-loader' ], type: 'javascript/auto', }, + { + test: /\.svg$/, + issuer: /\.(sc|sa|c)ss$/, + type: 'asset/inline', + }, { test: /\.(bmp|png|jpe?g|gif)$/i, type: 'asset/resource',