Chore: update react-inlinesvg and use new icon caching mechanism (#97725)

* Update dependency react-inlinesvg to v4

* attempt to use new icon caching

* remove unicons chunk

* fix layout shift

* update snapshot

* parameterise cache by commit hash and clear old caches

* remove icon caching in storybook

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
This commit is contained in:
Ashley Harrison
2024-12-12 13:35:28 +00:00
committed by GitHub
parent 0a390cc069
commit b34fd6b6a1
16 changed files with 68 additions and 565 deletions

View File

@ -105,11 +105,6 @@ module.exports = {
type: 'asset/resource',
generator: { filename: 'static/img/[name].[hash:8][ext]' },
},
// for pre-caching SVGs as part of the JS bundles
{
test: /(unicons|mono|custom|solid)[\\/].*\.svg$/,
type: 'asset/source',
},
{
// Required for msagl library (used in Nodegraph panel) to work
test: /\.m?js$/,
@ -126,12 +121,6 @@ module.exports = {
chunks: 'all',
minChunks: 1,
cacheGroups: {
unicons: {
test: /[\\/]node_modules[\\/]@iconscout[\\/]react-unicons[\\/].*[jt]sx?$/,
chunks: 'initial',
priority: 20,
enforce: true,
},
moment: {
test: /[\\/]node_modules[\\/]moment[\\/].*[jt]sx?$/,
chunks: 'initial',