简体   繁体   中英

Babel with es2015 presets breaks on IE9

I am trying my project out on IE9, but I keeps having a Exception SCRIPT1010: Expected identifier on the following line:

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

I think it's because default is not wrapping in quotes.

Just don't know where is this coming from

I am using the following settings for Babel in webpack:

babel: { presets: ['es2015'], plugins: ['transform-runtime', 'add-module-exports'] }

And following package version:

"babel-core": "6.18.2", "babel-loader": "6.2.8", "babel-plugin-add-module-exports": "^0.2.1", "babel-plugin-check-es2015-constants": "6.8.0", "babel-plugin-transform-runtime": "6.15.0", "babel-polyfill": "6.16.0", "babel-preset-es2015": "6.18.0", "babel-runtime": "6.18.0",

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM