Skip to content

Commit 01aea0f

Browse files
committed
🔧 Adjust babel config (remove plugins that are included the @babel/preset-env)
1 parent ca331a3 commit 01aea0f

File tree

6 files changed

+407
-2179
lines changed

6 files changed

+407
-2179
lines changed

babel.config.js

+8-33
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
const path = require('path');
2-
3-
const config = {
1+
module.exports = {
42
presets: [
5-
'@babel/typescript',
3+
[
4+
'@babel/typescript',
5+
{
6+
onlyRemoveTypeImports: true,
7+
allowDeclareFields: true,
8+
},
9+
],
610
[
711
'@babel/env',
812
{
@@ -15,34 +19,5 @@ const config = {
1519
},
1620
],
1721
],
18-
plugins: [
19-
[
20-
'@babel/proposal-class-properties',
21-
{
22-
loose: true,
23-
},
24-
],
25-
'@babel/proposal-object-rest-spread',
26-
'@babel/plugin-proposal-optional-chaining',
27-
'@babel/plugin-proposal-nullish-coalescing-operator',
28-
[
29-
'babel-plugin-custom-import-path-transform',
30-
{
31-
transformImportPath: path.resolve(__dirname, 'scripts/transformImportPath.js'),
32-
},
33-
],
34-
[
35-
'babel-plugin-transform-imports',
36-
{
37-
lodash: {
38-
transform: 'lodash/${member}',
39-
preventFullImport: true,
40-
},
41-
},
42-
],
43-
'@babel/plugin-transform-runtime',
44-
],
4522
ignore: ['**/__tests__/', '**/*.test.js'],
4623
};
47-
48-
module.exports = config;

package.json

+4-11
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,16 @@
2727
"devDependencies": {
2828
"@ackee/browserslist-config": "^1.0.1",
2929
"@ackee/eslint-config": "^3.0.0",
30-
"@babel/cli": "7.x",
31-
"@babel/core": "7.x",
30+
"@babel/cli": "^7.14.3",
31+
"@babel/core": "^7.14.3",
3232
"@babel/eslint-parser": "^7.13.14",
33-
"@babel/plugin-proposal-class-properties": "7.x",
34-
"@babel/plugin-proposal-nullish-coalescing-operator": "7.x",
35-
"@babel/plugin-proposal-object-rest-spread": "7.x",
36-
"@babel/plugin-proposal-optional-chaining": "7.x",
37-
"@babel/plugin-transform-runtime": "7.x",
38-
"@babel/preset-env": "7.x",
39-
"@babel/preset-typescript": "7.x",
33+
"@babel/preset-env": "^7.14.2",
34+
"@babel/preset-typescript": "^7.13.0",
4035
"@types/jest": "25.x",
4136
"@types/node": "^14.14.37",
4237
"@typescript-eslint/eslint-plugin": "4.x",
4338
"@typescript-eslint/parser": "4.x",
4439
"babel-eslint": "^10.1.0",
45-
"babel-plugin-custom-import-path-transform": "1.x",
46-
"babel-plugin-transform-imports": "^2.0.0",
4740
"eslint": "^7.5.0",
4841
"eslint-plugin-compat": "3.9.0",
4942
"eslint-plugin-flowtype": "^5.2.0",

packages/@ackee/antonio-auth/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
"node": ">=12"
2929
},
3030
"dependencies": {
31-
"@ackee/antonio-utils": "^4.0.0-beta.10",
32-
"@babel/runtime": "7.14.0"
31+
"@ackee/antonio-utils": "^4.0.0-beta.10"
3332
},
3433
"devDependencies": {
3534
"@ackee/petrus": "5.2.1"

packages/@ackee/antonio-core/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
"directory": "packages/@ackee/antonio-core"
2626
},
2727
"dependencies": {
28-
"@babel/runtime": "7.14.0",
2928
"fetch-headers": "^2.0.0",
3029
"loglevel": "^1.7.1"
3130
},

packages/@ackee/antonio-utils/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"directory": "packages/@ackee/antonio-utils"
2828
},
2929
"dependencies": {
30-
"@babel/runtime": "7.14.0",
3130
"abortcontroller-polyfill": "1.7.1"
3231
},
3332
"peerDependencies": {

0 commit comments

Comments
 (0)