在webpack配置babel转换es6,兼容ie11,在webpack中使用babel-preset,babel-polyfill
首先安装babel-loader和babel核心库:npminstall--save-devbabel-loader@babel/core然后在webpack.config.js中modules中配置babelmodule:{rules:[{test:/\.js$/,exclude:/node_modules/,loader:"babel-loader"}]}exclude:/node_modul