Skip to content

Commit

Permalink
fix webpack config
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianscatularo committed May 10, 2024
1 parent ff0970f commit 701850a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion frontend/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down

0 comments on commit 701850a

Please sign in to comment.