mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-04-26 06:05:47 +08:00
Test module scoping (#2198)
* Correct readme * Add tests * Update README.md
This commit is contained in:
@@ -34,7 +34,7 @@ var publicUrl = '/my-custom-url';
|
||||
module.exports = {
|
||||
output: {
|
||||
// ...
|
||||
publicPath: publicUrl + '/'
|
||||
publicPath: publicUrl + '/'
|
||||
},
|
||||
// ...
|
||||
plugins: [
|
||||
@@ -68,10 +68,14 @@ var ModuleScopePlugin = require('react-dev-utils/ModuleScopePlugin');
|
||||
|
||||
module.exports = {
|
||||
// ...
|
||||
plugins: [
|
||||
new ModuleScopePlugin(paths.appSrc),
|
||||
resolve: {
|
||||
// ...
|
||||
],
|
||||
plugins: [
|
||||
new ModuleScopePlugin(paths.appSrc),
|
||||
// ...
|
||||
],
|
||||
// ...
|
||||
},
|
||||
// ...
|
||||
}
|
||||
```
|
||||
@@ -132,7 +136,7 @@ console.log('Just cleared the screen!');
|
||||
|
||||
#### `eslintFormatter(results: Object): string`
|
||||
|
||||
This is our custom ESLint formatter that integrates well with Create React App console output.
|
||||
This is our custom ESLint formatter that integrates well with Create React App console output.<br>
|
||||
You can use the default one instead if you prefer so.
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user