Skip to content

Commit f8018b2

Browse files
committed
build: add npm run serve:dist to server from dist folder for quick testing in electron
1 parent 058b859 commit f8018b2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src-build/serveForPlatform.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ if (target !== recommendedTarget) {
6666
console.warn(y(`╚${border}╝\n`));
6767
}
6868

69+
const serveDist = process.argv.includes('--dist');
70+
71+
if (serveDist && target === "tauri") {
72+
console.error('Error: --dist flag is only supported with Electron, not Tauri.');
73+
process.exit(1);
74+
}
75+
6976
console.log(`Platform: ${platform}, target: ${target}`);
7077

7178
// Run platform-specific command
@@ -80,7 +87,6 @@ if (target === "tauri") {
8087
console.log('Starting Tauri dev server...');
8188
await execa("npx", ["tauri", "dev", "--config", "./src-tauri/tauri-local.conf.json"], {stdio: "inherit"});
8289
} else {
83-
const serveDist = process.argv.includes('--dist');
8490
const srcNodePath = resolve("../phoenix/src-node");
8591
console.log(`Running "npm install" in ${srcNodePath}`);
8692
await execa("npm", ["install"], {cwd: srcNodePath, stdio: "inherit"});

0 commit comments

Comments
 (0)