Skip to content

Commit

Permalink
fix: cleared babel issues & rn-css working
Browse files Browse the repository at this point in the history
  • Loading branch information
sra1kumar-NULL committed Nov 8, 2024
1 parent c8bc604 commit a4f796f
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/next-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,18 @@ jobs:
const nextConfig = {
...originalConfig,
webpack(config) {
webpack(config, { isServer }) {
config.resolve.alias['react-native'] = 'react-native-web';
// Add support for JSX and ensure React Native CSS works
if (!isServer) {
config.module.rules.push({
test: /\.(js|jsx|ts|tsx)$/,
use: ['babel-loader'],
exclude: /node_modules/,
});
}
return config;
},
typescript: {
Expand Down Expand Up @@ -106,6 +116,13 @@ jobs:
}
EOT
- name: Install dependencies and clean cache
working-directory: test-app
run: |
npm install
# Clean npm cache to avoid potential issues with older versions
npm cache clean --force
- name: Build Next.js app
working-directory: test-app
env:
Expand Down

0 comments on commit a4f796f

Please sign in to comment.