Skip to content

Commit

Permalink
fix: always use example app's babel config. closes #611
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Aug 12, 2024
1 parent 0d915f4 commit 9a471e6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 20 deletions.
14 changes: 6 additions & 8 deletions packages/react-native-builder-bob/babel-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,9 @@ const getConfig = (defaultConfig, { root, pkg }) => {
}

return {
...defaultConfig,
overrides: [
{
...defaultConfig,
exclude: path.join(root, src),
},
{
include: path.join(root, src),
presets: [[require.resolve('./babel-preset'), { modules: 'commonjs' }]],
},
...(defaultConfig.overrides == null ? [] : defaultConfig.overrides),
{
exclude: /\/node_modules\//,
plugins: [
Expand All @@ -65,6 +59,10 @@ const getConfig = (defaultConfig, { root, pkg }) => {
],
],
},
{
include: path.join(root, src),
presets: [require.resolve('./babel-preset')],
},
],
};
};
Expand Down
4 changes: 0 additions & 4 deletions packages/react-native-builder-bob/babel-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ module.exports = function (api, options, cwd) {
],
plugins: [
require.resolve('@babel/plugin-transform-strict-mode'),
require.resolve('@babel/plugin-transform-private-methods'),
require.resolve('@babel/plugin-transform-private-property-in-object'),
require.resolve('@babel/plugin-transform-class-properties'),
require.resolve('@babel/plugin-transform-classes'),
[
require.resolve('./lib/babel'),
{
Expand Down
4 changes: 0 additions & 4 deletions packages/react-native-builder-bob/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@
},
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-transform-class-properties": "^7.24.7",
"@babel/plugin-transform-classes": "^7.25.0",
"@babel/plugin-transform-private-methods": "^7.24.7",
"@babel/plugin-transform-private-property-in-object": "^7.24.7",
"@babel/plugin-transform-strict-mode": "^7.24.7",
"@babel/preset-env": "^7.25.2",
"@babel/preset-flow": "^7.24.7",
Expand Down
4 changes: 0 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12986,10 +12986,6 @@ __metadata:
dependencies:
"@babel/cli": ^7.24.8
"@babel/core": ^7.25.2
"@babel/plugin-transform-class-properties": ^7.24.7
"@babel/plugin-transform-classes": ^7.25.0
"@babel/plugin-transform-private-methods": ^7.24.7
"@babel/plugin-transform-private-property-in-object": ^7.24.7
"@babel/plugin-transform-strict-mode": ^7.24.7
"@babel/preset-env": ^7.25.2
"@babel/preset-flow": ^7.24.7
Expand Down

0 comments on commit 9a471e6

Please sign in to comment.