42

My app.js file in meteor has exceeded the limit of 100KB How do I fix this now? Does It affects my application? Is that because of installing packages?

loganfsmyth
  • 156,129
  • 30
  • 331
  • 251
Harsh Makadia
  • 3,263
  • 5
  • 30
  • 42
  • 2
    Possible duplicate of [What does "The code generator has deoptimised the styling of \[some file\] as it exceeds the max of "100KB"" mean?](http://stackoverflow.com/questions/29576341/what-does-the-code-generator-has-deoptimised-the-styling-of-some-file-as-it-e) – Stephen Woods Feb 04 '16 at 05:02

2 Answers2

65

This is not a real issue. Just a warning. When babel compiles some code, it try to offer a readable output, but when files become big (>100KB), babel considers (by default) that it's not useful to keep this option enabled (because yes it's an option, see https://stackoverflow.com/a/30879872/988941 for more information).

It's not a problem to keep it. If you don't care about readability, you can just use compact: true. Or false if you do. Only "auto" value (default value) will print this warning.

Community
  • 1
  • 1
MoOx
  • 8,423
  • 5
  • 40
  • 39
16

At first for more explanation read the Babel documentation on Options.

It is a common option of Babel compiler that commands not include superfluous whitespace characters and line terminators. sometimes ago its threshold was 100KB but now is 500KB.

And I advise to you disable this option in your development environment, with this code in .babelrc file.

{
    "env": {
      "development" : {
        "compact": false
      }
    }
}

For production environment Babel use the default config which is auto.

Tony
  • 9,672
  • 3
  • 47
  • 75
AmerllicA
  • 29,059
  • 15
  • 130
  • 154