├── .gitignore
├── styles.module.css
├── pages
├── _document.tsx
└── index.tsx
├── next-env.d.ts
├── babel.config.js
├── README.md
├── next.config.js
├── tsconfig.json
└── package.json
/.gitignore:
--------------------------------------------------------------------------------
1 | .expo/
2 | .next/
3 | node_modules/
4 |
--------------------------------------------------------------------------------
/styles.module.css:
--------------------------------------------------------------------------------
1 | .error {
2 | color: white;
3 | background-color: red;
4 | }
5 |
--------------------------------------------------------------------------------
/pages/_document.tsx:
--------------------------------------------------------------------------------
1 | import Document from "@expo/next-adapter/document";
2 |
3 | export default Document;
4 |
--------------------------------------------------------------------------------
/next-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 | ///
4 |
--------------------------------------------------------------------------------
/babel.config.js:
--------------------------------------------------------------------------------
1 | module.exports = function (api) {
2 | api.cache(true);
3 |
4 | return {
5 | presets: ["@expo/next-adapter/babel"],
6 | };
7 | };
8 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # expo-nextjs-webpack-5
2 |
3 | > This work has been merged into the @expo/next-adapter. If your looking for a more up-to-date setup with more features checkout [solito](https://github.com/nandorojo/solito)
4 |
--------------------------------------------------------------------------------
/next.config.js:
--------------------------------------------------------------------------------
1 | const { withExpo } = require("@expo/next-adapter");
2 | const withPlugins = require("next-compose-plugins");
3 |
4 | const withTM = require("next-transpile-modules")(["react-native-web"]);
5 |
6 | module.exports = withPlugins(
7 | [withTM, [withExpo, { projectRoot: __dirname }]],
8 | {}
9 | );
10 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es5",
4 | "lib": [
5 | "dom",
6 | "dom.iterable",
7 | "esnext"
8 | ],
9 | "allowJs": true,
10 | "skipLibCheck": true,
11 | "strict": false,
12 | "forceConsistentCasingInFileNames": true,
13 | "noEmit": true,
14 | "esModuleInterop": true,
15 | "module": "esnext",
16 | "moduleResolution": "node",
17 | "resolveJsonModule": true,
18 | "isolatedModules": true,
19 | "jsx": "preserve"
20 | },
21 | "include": [
22 | "next-env.d.ts",
23 | "**/*.ts",
24 | "**/*.tsx"
25 | ],
26 | "exclude": [
27 | "node_modules"
28 | ]
29 | }
30 |
--------------------------------------------------------------------------------
/pages/index.tsx:
--------------------------------------------------------------------------------
1 | import { StyleSheet, ActivityIndicator, View, Text } from "react-native";
2 | import styleModule from "../styles.module.css"
3 |
4 | export default function IndexPage() {
5 | return (
6 |
7 | Hello, World!
8 |
9 |
17 |
18 | );
19 | }
20 |
21 | const styles = StyleSheet.create({
22 | text: {
23 | color: "red",
24 | },
25 | });
26 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "scripts": {
3 | "postinstall": "npx patch-package",
4 | "prestart": "rm -rf .next .expo node_modules/.cache",
5 | "start": "npx next"
6 | },
7 | "dependencies": {
8 | "@expo/next-adapter": "3.0.1",
9 | "next": "11.0.1",
10 | "patch-package": "6.4.7",
11 | "postcss": "^8.3.5",
12 | "react": "17.0.2",
13 | "react-dom": "17.0.2",
14 | "react-native": "0.64.2",
15 | "react-native-web": "0.17.1"
16 | },
17 | "devDependencies": {
18 | "@types/react": "17.0.11",
19 | "babel-preset-expo": "8.4.0",
20 | "next-compose-plugins": "2.2.1",
21 | "next-transpile-modules": "8.0.0",
22 | "typescript": "4.3.2",
23 | "webpack": "5.39.0"
24 | }
25 | }
26 |
--------------------------------------------------------------------------------