New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
speed-measure-webpack-plugin does not work with create-react-app #164
Comments
Hi, I faced to that same problem few weeks ago. I thought first time it was because I used craco. For me the problem occured only when doing a yarn run start. My dependencies' versions: "@craco/craco": "^6.1.0",
"@types/history": "^4.7.0",
"@types/node": "^14.14.0",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@types/react-redux": "^5.0.0",
"@types/react-router-dom": "^5.1.0",
"copy-webpack-plugin": "^6.4.0",
"express": "^4.17.0",
"history": "^4.10.0",
"html-webpack-plugin": "^4.5.0",
"react": "^17.0.0",
"react-dev-utils": "^11.0.0",
"react-dom": "^17.0.0",
"react-intl": "^5.12.0",
"react-redux": "^5.1.0",
"react-router-dom": "^5.2.0",
"react-scripts": "^4.0.0",
"typescript": "^4.1.0",
"web-vitals": "^1.1.0" Thanks! |
Seeing same error when recompiling with react-scripts ^3.4.4 and react-app-rewired. |
I got it working with such a configuration
|
how should I use this configuration? |
not apply to me,its not work |
Use it in
|
Issue still present, it does not work with CRA. I narrowed the issue and did a little work-around for now. It doesn't measure all, but it measures mosts of the build. I added in my config-override.js, after the instanciation of smp:
Also you can also integrate "customize-cra" to have a progress bar and a few more details. Here is the full-file. DO NOT FORGET TO INSTALL THE PLUGINS to have it work:
|
this route is actually what caused the issue for me. what got it working for me was: const smp = new SpeedMeasurePlugin();
module.exports = {
webpack: smp.wrap({
plugins: [
//...
],
}),
}; |
Thanks for building this plugin. It would be super useful to make it working with create-react-app, since this has been growing by a large factor, and becomes the de-facto.
Error: Below is the error that I receive in case this is not a known issue:
Project is standard, CRA + Typescript:
const smp = new SpeedMeasurePlugin();
const webpackConfigWithMeasure = (webpackEnv) => smp.wrap(webpackConfig(webpackEnv));
module.exports = webpackConfigWithMeasure;
Repro:
Note, that the project build, but it crashes at recompile.
The text was updated successfully, but these errors were encountered: