当我运行时,npx webpack-cli --analyze --node-env development
我收到一个关于它不喜欢的错误<React.StrictMode>
:
Webpack Bundle Analyzer is started at http://127.0.0.1:8888
Use Ctrl+C to close it
Hash: 24852f2f5b5cef02cfe2
Version: webpack 4.42.0
Time: 57ms
Built at: 08/11/2021 2:53:12 PM
Asset Size Chunks Chunk Names
main.js 4.09 KiB main [emitted] main
Entrypoint main = main.js
[./src/index.js] 316 bytes {main} [built] [failed] [1 error]
ERROR in ./src/index.js 9:2
Module parse failed: Unexpected token (9:2)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|
| ReactDOM.render(
> <React.StrictMode>
| <App />
| </React.StrictMode>,
我正在使用来自.\node_modules\react-scripts\config\webpack.config.js
. 为什么 webpack 不喜欢 React.StrictMode?