Skip to content

Commit 919f5d8

Browse files
committed
chore: removing webpack, moving to expo metro
1 parent 397a17b commit 919f5d8

File tree

7 files changed

+383
-114
lines changed

7 files changed

+383
-114
lines changed

example/app.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@
3030
"backgroundColor": "#6200EE"
3131
}
3232
},
33+
"web": {
34+
"bundler": "metro"
35+
},
3336
"splash": {
3437
"image": "./assets/images/splash.png",
3538
"backgroundColor": "#6200EE",

example/babel.config.js

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,17 @@
11
const path = require('path');
2+
const { getConfig } = require('react-native-builder-bob/babel-config');
23

3-
const pak = require('../package.json');
4+
const pkg = require('../package.json');
5+
6+
const root = path.resolve(__dirname, '..');
47

58
module.exports = function (api) {
69
api.cache(true);
710

8-
return {
9-
presets: ['babel-preset-expo'],
10-
plugins: [
11-
[
12-
'module-resolver',
13-
{
14-
extensions: ['.tsx', '.ts', '.js', '.json'],
15-
alias: {
16-
[`${pak.name}/package.json`]: path.join(
17-
__dirname,
18-
'..',
19-
'package.json'
20-
),
21-
// For development, we want to alias the library to the source
22-
[pak.name]: path.join(__dirname, '..', 'src'),
23-
},
24-
},
25-
],
26-
['@babel/plugin-proposal-export-namespace-from'],
27-
['react-native-reanimated/plugin'],
28-
],
29-
};
11+
return getConfig(
12+
{
13+
presets: ['babel-preset-expo'],
14+
},
15+
{ root, pkg }
16+
);
3017
};

example/metro.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const { withMetroConfig } = require('react-native-monorepo-config');
44

55
/** @type {import('metro-config').MetroConfig} */
66
module.exports = withMetroConfig(getDefaultConfig(__dirname), {
7+
isCSSEnabled: true,
78
root: path.resolve(__dirname, '..'),
89
dirname: __dirname,
910
});

example/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"web": "EXPO_NO_TYPESCRIPT_SETUP=1 expo start --web"
1515
},
1616
"dependencies": {
17+
"@expo/metro-runtime": "~5.0.4",
1718
"@expo/vector-icons": "^14.1.0",
1819
"@expo/webpack-config": "~19.0.1",
1920
"@pchmn/expo-material3-theme": "^1.3.2",

example/webpack.config.js

Lines changed: 0 additions & 49 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"react": "19.0.0",
9393
"react-dom": "19.0.0",
9494
"react-native": "0.79.2",
95-
"react-native-builder-bob": "^0.21.3",
95+
"react-native-builder-bob": "^0.40.10",
9696
"react-native-safe-area-context": "5.4.0",
9797
"react-test-renderer": "19.0.0",
9898
"release-it": "^13.4.0",

0 commit comments

Comments
 (0)