美文网首页
让Webpack2打包JS支持IE8

让Webpack2打包JS支持IE8

作者: JasonQiao | 来源:发表于2017-05-17 15:19 被阅读707次

    参考https://www.maizhiying.me/posts/2017/03/01/webpack-babel-ie8-support.html

    1. 安装es3ify-loader
    2. 添加规则
          {
            test: /\.js$/,
            loader: 'es3ify-loader'
          },
    
    1. 配置uglifyjsplugin
        new webpack.optimize.UglifyJsPlugin({
          compress: {
              warnings: false,
              properties: false
          },
          output: {
            keep_quoted_props: true
          },
          mangle: {
            screw_ie8: false,
            except: ['e']
          }
        })
    

    更多:
    https://feifeiyum.github.io/2017/01/11/webpack2-intro/
    http://www.aliued.com/?p=3240
    http://imweb.io/topic/5868e1abb3ce6d8e3f9f99bb

    相关文章

      网友评论

          本文标题:让Webpack2打包JS支持IE8

          本文链接:https://www.haomeiwen.com/subject/fdpdxxtx.html