Closed
Description
WARNING in asset size limit: The following asset(s) exceed the recommended size limit (250 kB). This can impact web performance. Assets: bundle.js (10.3 MB)
WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (250 kB). This can impact web performance. Entrypoints: app (10.3 MB) bundle.js
WARNING in webpack performance recommendations: You can limit the size of your bundles by using System.import() or require.ensure to lazy load some parts of your application. For more info visit https://webpack.js.org/guides/code-splitting/
I use webpack@2.1.0-beta.27,it do not have the warning before.
The warning comes after installing all the package again.It would be great appreciated ,if there any solutions.
Activity
[-]Entrypoint size exeeds this limit [/-][+]Entrypoint size exeeds the recommened limit (250kB)[/+]jmalonzo commentedon Dec 15, 2016
@xianshannan The warning is pretty much explanatory. But you can turn it off by adding
performance: { hints: false }
to your webpack config.TheLarkInn commentedon Dec 15, 2016
It is just a warning but like @jmalonzo said this can be changed with performance: { hints: false }
samonxian commentedon Dec 15, 2016
@jmalonzo @TheLarkInn Thinks a lot! It did work. I tried
stat: { warning: false }
before,it did not work.In ther API,i didn't find theperformance: { hints: false }
.glenjamin commentedon Dec 15, 2016
Could this be kept open as a docs bug? There's no mention of
performance
in the configuration docs. Ideally I'd have this on in my production build but not in dev.TheLarkInn commentedon Dec 15, 2016
We have an issue on it on our docs page.
Here's the PR in review. Hopefully this helps!!!
webpack/webpack.js.org#500
TheLarkInn commentedon Dec 15, 2016
An aside,
Although it is subjective we'd recommend using it for dev as well! (But maybe set high size limits) that way developers dont have to be caught off guard by performance errors that could be caught in the act during dev vs prod builds.
just-boris commentedon Dec 16, 2016
What do you think about disabling this by default for development builds?
Developer mode build (
NODE_ENV=development
) React+React-DOM+React-router gives me1.1Mb
bundle. But the warning doesn't make any sense, because with NODE_ENV=production, bundle size will be reduced and everything will be fine.glenjamin commentedon Dec 16, 2016
This is the problem I had - the warning is kinda relevant, but as long as I set the NODE_ENV and run DCE in production the resulting bundle should be fine.
just-boris commentedon Dec 16, 2016
So far I have solved my problem with the following configuration
Don't think any sense to show developer the size of the build with developer-warnings, hot-reloading runtime, a stuff, that is not included in production builds, where the size matters.
damassi commentedon Dec 20, 2016
I just ran into this issue as well. Having this error on by default seems, IMO, to be somewhat presumptuous as it is making a lot of assumptions about the users environment.
Any thoughts about turning this off by default?
glenjamin commentedon Dec 20, 2016
I think on by default is sensible, otherwise no-one will know to turn it on. Perhaps the warning should include a link to the docs for how to turn it off / change the limit?
damassi commentedon Dec 20, 2016
That would definitely help! But still -- it seems like Webpack has many features that could benefit users if they only knew to use them. When the time comes, thanks to sections like
Optimization
in your docs, they discover them and turn them on. This seems no different. JS runs in so many different environments, all with different perf standards / requirements. Default warnings seem most helpful when you can be totally certain that your assumption is global.49 remaining items