-
-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: upgrade to babel-preset-env #908
Conversation
@@ -1,6 +1,5 @@ | |||
import environment from './environment'; | |||
import {PLATFORM} from 'aurelia-pal'; | |||
import 'babel-polyfill'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aurelia-bootstrapper does load aurelia-polyfills. This line is unnecessary.
}, | ||
"loose": true, | ||
"modules": process.env.BABEL_TARGET === 'node' ? 'commonjs' : false, | ||
"useBuiltIns": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See #909
} | ||
] | ||
], | ||
"stage-1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For webpack, use "stage-1" to replace handpicked "transform-class-properties".
Added "syntax-flow" for webpack setup too.
"last 2 versions", | ||
"not ie <= 11" | ||
], | ||
"uglify": process.env.NODE_ENV === 'production', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As we are using terser now, we don't need to ask preset-env to generate compatible code for uglify-js v3.
], | ||
"presets": [ | ||
[ | ||
"env", { | ||
"targets": process.env.BABEL_TARGET === 'node' ? { | ||
"node": process.env.IN_PROTRACTOR ? '6' : 'current' | ||
} : { | ||
"browsers": [ | ||
"last 2 versions", | ||
"not ie <= 11" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aurelia claimed supporting IE10.
Unify babelrc for webpack and cli bundler.
Cleaned up webpack babelrc to use same plugins as other setup.
Add IE10/11 support back to webpack setup as that is what Aurelia claimed to support.
closes #754, #909