-
Notifications
You must be signed in to change notification settings - Fork 25
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
Production build is really slow. #51
Comments
@nkrusch any ideas? |
@zicsus If you downgrade does it continue or no? Also try |
@nkrusch I'm not sure if this problem is recent or old because I noticed when I started compiling large projects. I will take look at latest alpha and let you know. |
I have two thoughts which I have been thinking about to address this type of issues:
I'm thinking running on tags using CI. |
Try viewing what is being included in |
@nkrusch |
next options:
|
I don't know if you have had a chance to test this further? I am now wondering how much this impacts the build time especially since it sounds like the issues is with prod and not dev:
It is the only difference between the two. |
I haven't tested it yet. Webpack might be doing some extra optimations in production mode but its there suggested way. I wonder why it's making so much difference. |
According to this page- https://webpack.js.org/configuration/mode/ changing mode to production brings some additional optimizations. |
I was assuming that. If you try building locally, either specifying no mode or dev mode, does that makes any difference in the build time? Trying to figure out the cause of the latency. If it makes no difference then the cause is somewhere else. |
Just tested it and setting mode to development (permanently) and making |
Here you go- #54 Can you make a release for this? |
First, great that this explains the cause! webpack dev mode does not minifying the source. I believe it concatenates the files. It would explains why 3rd party files build fast. The flip-side is it does not minify js files in cases where that *is* the desired behavior. How about best of both worlds and make the mode configurable? I'm thinking:
when the use case is to always use specific mode. If not specified, default to |
You're good to go. Ignore my comment on the PR. After thinking for a while I think that it can be really useful. |
Let me know if the latest alpha resolves this issue? If yes, I will roll out a patch and we can close this. |
Yup! you can proceed. |
Describe the bug
Production build of scripts is really slow without any significant reason.
To Reproduce
npm run build
Expected behavior
I think than production build should go faster than current speed. There is not generation of source map or anything just same compilation as development with some minification. is the minifaction the issue?
When I just used webpack for compiling, the speeds were significantly faster than current time even when source maps where generated with minifcation.
The text was updated successfully, but these errors were encountered: