Bug Report
It seems that the current babel implementation of decorators relies on using Symbol. However, even with babel polyfills enabled, in this instance Symbol is not polyfilled and an error is thrown in IE11.
Current Behavior
IE11 throws an error when using babelled decorators: 'Symbol' is undefined
Input Code
Using a decorator anywhere in the code
Expected behavior/code
The Symbol polyfill perhaps should be imported automatically
Babel Configuration (.babelrc, package.json, cli command)
{
"presets": [
["@babel/preset-env", {
"targets": {
"browsers": [
"ie 11",
"last 2 versions",
"> 1%"
]
},
"modules": false,
"useBuiltIns": "usage"
}]
],
"plugins": [
["@babel/plugin-proposal-class-properties"],
["@babel/plugin-proposal-decorators", { "decoratorsBeforeExport": false }],
....
Environment
- Browser: IE11 (and probably any IE)
- Babel version(s): v7.2.0
- Node/npm version: node 10.3.0/npm 6.1.0
- OS: OSX 10.14.3
- Monorepo: ?
- How you are using Babel: ?
Possible Solution
Currently you can get round it by simply mentioning Symbol at the top of your project
Bug Report
It seems that the current babel implementation of decorators relies on using Symbol. However, even with babel polyfills enabled, in this instance Symbol is not polyfilled and an error is thrown in IE11.
Current Behavior
IE11 throws an error when using babelled decorators:
'Symbol' is undefinedInput Code
Using a decorator anywhere in the code
Expected behavior/code
The Symbol polyfill perhaps should be imported automatically
Babel Configuration (.babelrc, package.json, cli command)
Environment
Possible Solution
Currently you can get round it by simply mentioning
Symbolat the top of your project