diff --git a/frontend/next.config.js b/frontend/next.config.js index 3d892f0..4c300ee 100644 --- a/frontend/next.config.js +++ b/frontend/next.config.js @@ -32,7 +32,13 @@ module.exports = withBundleAnalyzer({ config.experiments = { asyncWebAssembly: true, layers: true } const fileLoaderRule = config.module.rules.find( - (rule) => rule.test && rule.test.test('.svg') + (rule) => { + if (rule && Array.isArray(rule.test)) { + return rule.test.find((test) => test.test('.svg')) + } else if (rule && rule.test instanceof RegExp) { + return rule.test.test('.svg') + } + } ) fileLoaderRule.exclude = /\.inline\.svg$/ config.module.rules.push({