Fix Windows desktop build: split workspace deps from metro-patched export
The NODE_OPTIONS --require patch for metro config was being applied during build:workspace-deps, causing expo-module-build (a bash script) to be loaded through Node's JS loader on Windows.
This commit is contained in:
@@ -348,12 +348,16 @@ jobs:
|
|||||||
fs.writeFileSync(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`);
|
fs.writeFileSync(packageJsonPath, `${JSON.stringify(packageJson, null, 2)}\n`);
|
||||||
NODE
|
NODE
|
||||||
|
|
||||||
|
- name: Build workspace dependencies
|
||||||
|
run: npm run build:workspace-deps --workspace=@getpaseo/app
|
||||||
|
|
||||||
- name: Build web app for desktop
|
- name: Build web app for desktop
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
$patchPath = (Get-Item "$env:GITHUB_WORKSPACE/scripts/metro-config-windows-loader-patch.cjs").FullName
|
$patchPath = (Get-Item "$env:GITHUB_WORKSPACE/scripts/metro-config-windows-loader-patch.cjs").FullName
|
||||||
$env:NODE_OPTIONS = "--require=$patchPath"
|
$env:NODE_OPTIONS = "--require=$patchPath"
|
||||||
npm run build:web --workspace=@getpaseo/app
|
npx expo export --platform web
|
||||||
|
working-directory: packages/app
|
||||||
|
|
||||||
- name: Detect existing GitHub release state
|
- name: Detect existing GitHub release state
|
||||||
if: env.IS_SMOKE_TAG != 'true'
|
if: env.IS_SMOKE_TAG != 'true'
|
||||||
|
|||||||
Reference in New Issue
Block a user