Skip to content

Commit

Permalink
Tighten webpack rule merge rules to prevent clashes (#376)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Skoufis <[email protected]>
  • Loading branch information
AntoLepejian and askoufis authored Nov 15, 2024
1 parent 77e9fa8 commit 7b4b2f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .changeset/nasty-brooms-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'playroom': patch
---

Tighten webpack config merge rules to prevent replacing playroom webpack config with user-provided webpack config

When merging user-provided webpack config, a module rule's `test`, `include` and `exclude` property will all be compared.
2 changes: 2 additions & 0 deletions lib/makeWebpackConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,8 @@ module.exports = async (playroomConfig, options) => {
module: {
rules: {
test: 'match',
include: 'match',
exclude: 'match',
use: 'replace',
},
},
Expand Down

0 comments on commit 7b4b2f0

Please sign in to comment.