What does “The code generator has deoptimised the styling of [some file] as it exceeds the max of ”100KB“” mean?

前端 未结 9 1435
失恋的感觉
失恋的感觉 2020-11-30 19:18

I added a new npm package to my project and require it in one of my modules.

Now I get this message from webpack,

build modulesNote: The code generator

9条回答
  •  失恋的感觉
    2020-11-30 19:41

    For more explanation read THIS LINK, it is option of Babel compiler that commands to not include superfluous whitespace characters and line terminators. some times ago its threshold was 100KB but now is 500KB.

    I proffer 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.

提交回复
热议问题