Skip to content

Commit

Permalink
feat(all): use core-js v3 to replace deprecated @babel/polyfill
Browse files Browse the repository at this point in the history
Reference: https://github.com/zloirock/core-js#babelpolyfill
https://babeljs.io/blog/2019/03/19/7.4.0#migration-from-core-js-2
This migration is necessary to keep future cli-bundler built working as @babel/polyfill will stay at core-js v2 which could cause potiential version conflicts with core-js v3.
  • Loading branch information
3cp committed Mar 24, 2019
1 parent dc14e4b commit 990af96
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 17 deletions.
21 changes: 11 additions & 10 deletions lib/dependencies.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,20 @@
"aurelia-webpack-plugin": "^3.0.0",
"aurelia-polyfills": "^1.3.3",
"autoprefixer": "^9.4.8",
"@babel/core": "^7.3.3",
"@babel/core": "^7.4.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^24.1.0",
"babel-loader": "^8.0.4",
"babel-plugin-istanbul": "^5.1.0",
"@babel/plugin-proposal-decorators": "^7.3.0",
"@babel/plugin-proposal-class-properties": "^7.3.3",
"@babel/polyfill": "^7.2.5",
"@babel/preset-env": "^7.3.1",
"@babel/register": "^7.0.0",
"babel-jest": "^24.5.0",
"babel-loader": "^8.0.5",
"babel-plugin-istanbul": "^5.1.1",
"@babel/plugin-proposal-decorators": "^7.4.0",
"@babel/plugin-proposal-class-properties": "^7.4.0",
"@babel/preset-env": "^7.4.2",
"@babel/register": "^7.4.0",
"browser-sync": "^2.26.3",
"clean-webpack-plugin": "^1.0.1",
"connect-history-api-fallback": "^1.6.0",
"copy-webpack-plugin": "^5.0.0",
"core-js": "^3.0.0",
"cross-env": "^5.2.0",
"cssnano": "^4.1.10",
"css-loader": "^1.0.0",
Expand Down Expand Up @@ -69,7 +69,7 @@
"json-loader": "^0.5.7",
"html-loader": "^0.5.5",
"karma": "^3.0.0",
"karma-babel-preprocessor": "^8.0.0-beta.0",
"karma-babel-preprocessor": "^8.0.0",
"karma-chrome-launcher": "^2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.4",
"karma-jasmine": "^2.0.1",
Expand All @@ -83,6 +83,7 @@
"postcss-loader": "^3.0.0",
"postcss-url": "^8.0.0",
"protractor": "^5.4.2",
"regenerator-runtime": "0.13.2",
"requirejs": "^2.3.6",
"sass-loader": "^7.1.0",
"style-loader": "^0.23.1",
Expand Down
1 change: 0 additions & 1 deletion lib/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ function getMetadata(dir) {
}

function installBabel() {
require('@babel/polyfill');
require('@babel/register')({
babelrc: false,
plugins: [
Expand Down
1 change: 0 additions & 1 deletion skeleton/cli-bundler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"@babel/plugin-proposal-class-properties": "",
"@babel/preset-env": "",
"@babel/core": "",
"@babel/polyfill": "",
"@babel/register": "",
"gulp-babel": "",
"gulp-cache": "",
Expand Down
7 changes: 6 additions & 1 deletion skeleton/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@
"aurelia-cli": "",
"aurelia-testing": "",
"aurelia-tools": "",
"core-js": "",
"gulp": "",
"minimatch": "",
"through2": "",
"vinyl-fs": ""
"vinyl-fs": "",

// @if feat.babel
"regenerator-runtime": "",
// @endif
},
"scripts": {
"build": "au build",
Expand Down
1 change: 0 additions & 1 deletion skeleton/protractor/test/protractor.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ exports.config = {
// @if feat.babel
process.env.BABEL_TARGET = 'node';
process.env.IN_PROTRACTOR = 'true';
require('@babel/polyfill');
require('@babel/register');
// @endif
// @if feat.typescript
Expand Down
5 changes: 4 additions & 1 deletion skeleton/scaffold-minimum/src/main.ext
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import '@babel/polyfill';
import 'core-js/stable';
// @if feat.babel
import 'regenerator-runtime/runtime';
// @endif
// @if feat.typescript
import {Aurelia} from 'aurelia-framework'
// @endif
Expand Down
5 changes: 4 additions & 1 deletion skeleton/scaffold-navigation/src/main.ext
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import '@babel/polyfill';
import 'core-js/stable';
// @if feat.babel
import 'regenerator-runtime/runtime';
// @endif
import 'bootstrap';
// @if feat.typescript
import {Aurelia} from 'aurelia-framework';
Expand Down
1 change: 0 additions & 1 deletion skeleton/webpack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"@babel/plugin-proposal-class-properties": "",
"@babel/preset-env": "",
"@babel/core": "",
"@babel/polyfill": "",
"@babel/register": "",
// @endif

Expand Down

0 comments on commit 990af96

Please sign in to comment.