Fix Windows build: build frontend separately from Tauri
The beforeBuildCommand in tauri.conf.json spawns a subprocess that inherits a broken rollup native binding. Build the frontend as a separate CI step, then skip beforeBuildCommand via TAURI_CONFIG override when running cargo tauri build. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -124,8 +124,16 @@ jobs:
|
|||||||
if exist package-lock.json del package-lock.json
|
if exist package-lock.json del package-lock.json
|
||||||
npm install
|
npm install
|
||||||
|
|
||||||
|
- name: Build frontend
|
||||||
|
working-directory: ./app
|
||||||
|
run: |
|
||||||
|
set "PATH=%USERPROFILE%\.cargo\bin;C:\Program Files\nodejs;%PATH%"
|
||||||
|
npm run build
|
||||||
|
|
||||||
- name: Build Tauri app
|
- name: Build Tauri app
|
||||||
working-directory: ./app
|
working-directory: ./app
|
||||||
|
env:
|
||||||
|
TAURI_CONFIG: "{\"build\":{\"beforeBuildCommand\":\"\"}}"
|
||||||
run: |
|
run: |
|
||||||
set "PATH=%USERPROFILE%\.cargo\bin;C:\Program Files\nodejs;%PATH%"
|
set "PATH=%USERPROFILE%\.cargo\bin;C:\Program Files\nodejs;%PATH%"
|
||||||
cargo tauri build
|
cargo tauri build
|
||||||
|
|||||||
Reference in New Issue
Block a user