-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow overriding Webpack module rules (#291)
- Loading branch information
Showing
2 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
'playroom': patch | ||
--- | ||
|
||
Allow overriding Webpack module rules | ||
|
||
Consumers may have complex Webpack configurations that can clash with Playroom's. | ||
In this case, it's useful to be able to override the module rules that Playroom defines. | ||
For example, overriding loaders defined for CSS files: | ||
|
||
```js | ||
// playroom.config.js | ||
module.exports = { | ||
webpackConfig: () => ({ | ||
module: { | ||
rules: [ | ||
// use your own CSS loaders | ||
{ test: /\.css$/, use: ['style-loader', 'css-loader'] }, | ||
], | ||
}, | ||
}), | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters