Skip to content

Commit e62f51d

Browse files
committed
fix: speed up fast refresh. Removed lazy() support
1 parent 04af4c6 commit e62f51d

20 files changed

+444
-369
lines changed

.config/eslint.config.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@ export default tseslint.config(
1212
languageOptions: {
1313
parserOptions: {
1414
projectService: true,
15-
tsconfigRootDir: import.meta.dirname,
1615
},
1716
},
1817
},
1918
globalIgnores([
2019
"**/dist/*",
20+
"**/example/*",
21+
"**/node_modules/*",
2122
".yarn/*",
2223
"**/eslint.config.[cm]js",
2324
"**/prettier.config.[cm]js",

.config/tsconfig.json

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

example/metro.config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
const path = require("path");
21
const { getDefaultConfig } = require("@expo/metro-config");
3-
// const { withReactNativeCSS } = require("react-native-css/metro");
2+
const { withReactNativeCSS } = require("react-native-css/metro");
43

54
/**
65
* Metro configuration
@@ -10,15 +9,16 @@ const { getDefaultConfig } = require("@expo/metro-config");
109
*/
1110
const config = getDefaultConfig(__dirname);
1211

12+
/**
13+
* This block of code is not required, it just makes the example work in this monorepo setup.
14+
*/
15+
const path = require("path");
16+
config.watchFolders = [path.resolve(__dirname, "../")];
1317
config.resolver.nodeModulesPaths = [
1418
path.resolve(__dirname, "node_modules"),
1519
path.resolve(__dirname, "../node_modules"),
1620
];
1721

18-
config.watchFolders = [path.resolve(__dirname, "../")];
19-
20-
module.exports = config;
21-
22-
// module.exports = withReactNativeCSS(config, {
23-
// globalClassNamePolyfill: false,
24-
// });
22+
module.exports = withReactNativeCSS(config, {
23+
globalClassNamePolyfill: true,
24+
});

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"@expo/metro-runtime": "~6.1.2",
1515
"@tailwindcss/postcss": "^4.1.11",
16-
"expo": "54.0.1",
16+
"expo": "54.0.10",
1717
"expo-status-bar": "~3.0.8",
1818
"react": "19.1.0",
1919
"react-dom": "19.1.0",

example/src/App.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
import { StyleSheet, Text } from "react-native";
1+
import { StyleSheet, Text, View } from "react-native";
22

33
import { StatusBar } from "expo-status-bar";
4-
import { View } from "react-native-css/components/View";
4+
5+
import "../global.css";
56

67
export default function App() {
78
return (
89
<View style={styles.container}>
9-
<Text>Hello world!!</Text>
10+
<Text className="text-red-800">Hello world!!!</Text>
1011
<StatusBar style="auto" />
1112
</View>
1213
);

example/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"extends": "../tsconfig",
33
"compilerOptions": {
44
"noEmit": true,
5-
"allowJs": true
65
},
76
"include": [
87
"src/**/*",

package.json

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,8 @@
3737
}
3838
},
3939
"./components": {
40-
"source": "./src/components/index.ts",
41-
"react-native": "./src/components/index.tsx",
42-
"import": {
43-
"types": "./dist/typescript/module/src/components/index.d.ts",
44-
"default": "./dist/module/components/index.js"
45-
},
46-
"require": {
47-
"types": "./dist/typescript/commonjs/src/components/index.d.ts",
48-
"default": "./dist/commonjs/components/index.js"
49-
}
40+
"default": "./src/components/index.js",
41+
"types": "./src/components/index.d.ts"
5042
},
5143
"./components/*": {
5244
"source": "./src/components/*.ts",
@@ -200,7 +192,7 @@
200192
"@babel/core": "^7.28.0",
201193
"@commitlint/config-conventional": "^19.8.1",
202194
"@eslint/js": "^9.30.1",
203-
"@expo/metro-config": "~54.0.2",
195+
"@expo/metro-config": "~54.0.5",
204196
"@ianvs/prettier-plugin-sort-imports": "^4.4.2",
205197
"@tailwindcss/postcss": "^4.1.12",
206198
"@testing-library/react-native": "^13.3.3",
@@ -211,13 +203,13 @@
211203
"@types/react": "^19.1.10",
212204
"@types/react-test-renderer": "^19",
213205
"babel-plugin-tester": "^12.0.0",
214-
"babel-preset-expo": "~54.0.0",
206+
"babel-preset-expo": "~54.0.3",
215207
"commitlint": "^19.8.1",
216208
"eas-build-cache-provider": "^16.4.2",
217209
"eslint": "^9.30.1",
218210
"eslint-config-prettier": "^10.1.5",
219211
"eslint-plugin-prettier": "^5.5.1",
220-
"expo": "54.0.1",
212+
"expo": "54.0.10",
221213
"jest": "^29.7.0",
222214
"jest-expo": "~54.0.12",
223215
"lefthook": "^1.12.3",
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from "react-native";
2-
32
export { ActivityIndicator } from "./ActivityIndicator";
43
export { Button } from "./Button";
54
export { FlatList } from "./FlatList";

0 commit comments

Comments
 (0)