Closed filoxo closed 1 year ago
Latest commit: 99ee5adc60d5a10ab0d322f840f67c25606d6601
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
@filoxo Hi! How can I override type: "asset/resource" with mergeWithRules? I don't get it.
@aaleo402 I've created a PR to our documentation site that might clarify: https://github.com/single-spa/single-spa.js.org/pull/574 please review and see if it helps you answer your own question. If not, please either ask in the community Slack channel or create a new issue that shows what you've attempted to do and any errors you're experiencing. thanks!
I was helping someone in the single-spa Slack who was having issues with conflicting SVG loaders. Our webpack config includes svgs in the list of images to process as resources, so its difficult to define a different loader for SVGs. SVGs are also very commonly imported as React components so this is a valuable usecase to accommodate. Prior to this change, one would need to filter out the problematic rule and the provide their own.
After this change, one would only need to define webpack-merge's
mergeWithRules
and use that.