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

前端 未结 9 1434
失恋的感觉
失恋的感觉 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:34

    in webpack 4 with multiple module rules you would just do something like this in your .js rule:

    {
         test: /\.(js)$/,
         loader: 'babel-loader',
         options: {
              presets: ['es2015'],    // or whatever
              plugins: [require('babel-plugin-transform-class-properties')], // or whatever
              compact: true    // or false during development
         }
    },
    

提交回复
热议问题