Skip to content

Entrypoint size exeeds the recommened limit (250kB) #3486

Closed
@samonxian

Description

@samonxian
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

changed the title [-]Entrypoint size exeeds this limit [/-] [+]Entrypoint size exeeds the recommened limit (250kB)[/+] on Dec 15, 2016
jmalonzo

jmalonzo commented on Dec 15, 2016

@jmalonzo

@xianshannan The warning is pretty much explanatory. But you can turn it off by adding performance: { hints: false } to your webpack config.

TheLarkInn

TheLarkInn commented on Dec 15, 2016

@TheLarkInn
Member

It is just a warning but like @jmalonzo said this can be changed with performance: { hints: false }

samonxian

samonxian commented on Dec 15, 2016

@samonxian
Author

@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 the performance: { hints: false }.

glenjamin

glenjamin commented on Dec 15, 2016

@glenjamin

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

TheLarkInn commented on Dec 15, 2016

@TheLarkInn
Member

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

TheLarkInn commented on Dec 15, 2016

@TheLarkInn
Member

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

just-boris commented on Dec 16, 2016

@just-boris

What do you think about disabling this by default for development builds?

Developer mode build (NODE_ENV=development) React+React-DOM+React-router gives me 1.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

glenjamin commented on Dec 16, 2016

@glenjamin

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.

Developer mode build (NODE_ENV=development) React+React-DOM+React-router gives me 1.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.

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

just-boris commented on Dec 16, 2016

@just-boris

So far I have solved my problem with the following configuration

performance: {
  hints: process.env.NODE_ENV === 'production' ? "warning" : false
},

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

damassi commented on Dec 20, 2016

@damassi

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.

WARNING in asset size limit: The following asset(s) exceed the recommended size limit (250 kB).
This can impact web performance.

Any thoughts about turning this off by default?

glenjamin

glenjamin commented on Dec 20, 2016

@glenjamin

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

damassi commented on Dec 20, 2016

@damassi

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

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @jmalonzo@bjornstar@Jakobud@glenjamin@damassi

        Issue actions

          Entrypoint size exeeds the recommened limit (250kB) · Issue #3486 · webpack/webpack