larryzhao
larryzhao

Reputation: 3213

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",

Upvotes: 1

Views: 1150

Answers (1)

Kreozot
Kreozot

Reputation: 1576

Try to use this babel plugins:

Upvotes: 2

Related Questions