Skip to content
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

Merged
merged 1 commit into from
Sep 12, 2018
Merged

feat: upgrade to babel-preset-env #908

merged 1 commit into from
Sep 12, 2018

Conversation

3cp
Copy link
Member

@3cp 3cp commented Jul 29, 2018

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

@3cp 3cp changed the title WIP feat: upgrade to babel-preset-env feat: upgrade to babel-preset-env Jul 29, 2018
@3cp 3cp changed the title feat: upgrade to babel-preset-env WIP feat: upgrade to babel-preset-env Jul 29, 2018
@@ -1,6 +1,5 @@
import environment from './environment';
import {PLATFORM} from 'aurelia-pal';
import 'babel-polyfill';
Copy link
Member Author

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
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #909

}
]
],
"stage-1"
Copy link
Member Author

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.

@3cp 3cp changed the title WIP feat: upgrade to babel-preset-env feat: upgrade to babel-preset-env Jul 30, 2018
"last 2 versions",
"not ie <= 11"
],
"uglify": process.env.NODE_ENV === 'production',
Copy link
Member Author

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"
Copy link
Member Author

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
@JeroenVinke JeroenVinke merged commit 5c6bb73 into aurelia:master Sep 12, 2018
@3cp 3cp deleted the upgrade-to-babel-preset-env branch September 20, 2018 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated use of babel-preset-es2015
2 participants