Skip to content

Commit addbb01

Browse files
authored
Document it
1 parent 322681c commit addbb01

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Diff for: packages/react-dev-utils/README.md

+20
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,26 @@ module.exports = {
5656
}
5757
```
5858

59+
60+
#### `new ModuleScopePlugin(appSrc: string)`
61+
62+
This Webpack plugin ensures that relative imports from app's source directory don't reach outside of it.
63+
64+
```js
65+
var path = require('path');
66+
var ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
67+
68+
69+
module.exports = {
70+
// ...
71+
plugins: [
72+
new ModuleScopePlugin(paths.appSrc),
73+
// ...
74+
],
75+
// ...
76+
}
77+
```
78+
5979
#### `new WatchMissingNodeModulesPlugin(nodeModulesPath: string)`
6080

6181
This Webpack plugin ensures `npm install <library>` forces a project rebuild.<br>

0 commit comments

Comments
 (0)