Skip to content

Commit 95ba14c

Browse files
authored
chore: simplify Babel configuration (#3934)
1 parent a6a8fd2 commit 95ba14c

3 files changed

Lines changed: 993 additions & 681 deletions

File tree

packages/documentation-framework/package.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,14 @@
99
"pf-docs-framework": "scripts/cli/cli.js"
1010
},
1111
"dependencies": {
12-
"@babel/core": "7.18.2",
13-
"@babel/plugin-proposal-class-properties": "7.17.12",
14-
"@babel/plugin-proposal-optional-chaining": "^7.18.9",
15-
"@babel/plugin-proposal-private-methods": "7.17.12",
16-
"@babel/plugin-proposal-private-property-in-object": "7.17.12",
17-
"@babel/plugin-transform-react-jsx": "7.17.12",
18-
"@babel/preset-env": "7.18.2",
12+
"@babel/core": "^7.24.3",
13+
"@babel/preset-env": "^7.24.3",
14+
"@babel/preset-react": "^7.24.1",
1915
"@mdx-js/util": "1.6.16",
2016
"@patternfly/ast-helpers": "^1.8.1",
2117
"@reach/router": "npm:@gatsbyjs/reach-router@1.3.9",
2218
"autoprefixer": "9.8.6",
23-
"babel-loader": "9.1.2",
19+
"babel-loader": "^9.1.3",
2420
"camelcase-css": "2.0.1",
2521
"chokidar": "3.5.3",
2622
"clean-webpack-plugin": "4.0.0",

packages/documentation-framework/scripts/webpack/webpack.base.config.js

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -55,20 +55,12 @@ module.exports = (_env, argv) => {
5555
options: {
5656
cacheDirectory: '.cache/babel',
5757
cacheCompression: false,
58-
presets: [['@babel/preset-env', {
59-
loose: true,
60-
corejs: 3,
61-
useBuiltIns: 'entry',
62-
exclude: ['transform-regenerator', 'transform-async-to-generator'],
63-
modules: false,
64-
targets: "> 0.25%, not dead"
65-
}]],
66-
plugins: [
67-
'@babel/plugin-transform-react-jsx',
68-
'@babel/plugin-proposal-class-properties',
69-
'@babel/plugin-proposal-optional-chaining',
70-
["@babel/plugin-proposal-private-methods", { "loose": false }],
71-
["@babel/plugin-proposal-private-property-in-object", { "loose": false }]
58+
presets: [
59+
'@babel/preset-react',
60+
['@babel/preset-env', {
61+
loose: true,
62+
targets: '> 1%, not dead'
63+
}],
7264
],
7365
}
7466
},

0 commit comments

Comments
 (0)