Skip to content

Commit

Permalink
fix: handled react native
Browse files Browse the repository at this point in the history
  • Loading branch information
yungblud committed Jan 30, 2024
1 parent 9841331 commit c4c16c6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 3 deletions.
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
"**/billets-admin-server",
"**/billets-admin-server/**",
"**/billets-server",
"**/billets-server/**"
"**/billets-server/**",
"**/react-native",
"**/react-native/**"
]
},
"scripts": {
Expand Down
17 changes: 17 additions & 0 deletions packages/store-client/next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
/* eslint-disable no-param-reassign */
/** @type {import('next').NextConfig} */

const nextConfig = {
experimental: {
externalDir: true,
},
webpack: (config) => {
config.resolve.alias = {
...(config.resolve.alias || {}),
// Transform all direct `react-native` imports to `react-native-web`
'react-native$': 'react-native-web',
}
config.resolve.extensions = [
'.web.js',
'.web.jsx',
'.web.ts',
'.web.tsx',
...config.resolve.extensions,
]

return config
},
}

module.exports = nextConfig
7 changes: 5 additions & 2 deletions packages/store-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
"react-dom": "^18",
"react-hook-form": "^7.48.2",
"zod": "^3.22.4",
"zustand": "^4.4.7"
"zustand": "^4.4.7",
"react-native-web": "^0.18.12",
"react-spinners": "^0.13.7"
},
"devDependencies": {
"@tanstack/eslint-plugin-query": "^5.12.1",
Expand All @@ -46,6 +48,7 @@
"@types/react-dom": "^18",
"ts-node": "^10.9.2",
"typescript": "^5",
"typescript-plugin-css-modules": "^5.0.2"
"typescript-plugin-css-modules": "^5.0.2",
"react-native": "^0.70.6"
}
}

0 comments on commit c4c16c6

Please sign in to comment.