针对这一问题,不同版本的webpack 处理方式不同 最直接的解决方案: https://stackoverflow.com/questions/29576341/what-does-the-code-generator-has-deoptimised-the-styling-of-some-file-as-it-e 针对 webpack 3.8.1 版本的处理方式 // Process JS with Babel. { test: /\.(js|jsx|mjs)$/, include: paths.appSrc, loader: require.resolve('babel-loader'), options: { compact: true, } }