summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoranatawa12 <anatawa12@icloud.com>2023-11-03 13:34:57 +0900
committerGitHub <noreply@github.com>2023-11-03 13:34:57 +0900
commit3e00b32faeb416c15ee75346ccd4c135bdfe576a (patch)
tree6024a3e91cd295b654891e1da99f44c6899df2c5 /scripts
parentfix cw test (diff)
downloadsharkey-3e00b32faeb416c15ee75346ccd4c135bdfe576a.tar.gz
sharkey-3e00b32faeb416c15ee75346ccd4c135bdfe576a.tar.bz2
sharkey-3e00b32faeb416c15ee75346ccd4c135bdfe576a.zip
build: port vite port configuration (#12223)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/dev.mjs4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/dev.mjs b/scripts/dev.mjs
index 26f29fc491..1d06aa541f 100644
--- a/scripts/dev.mjs
+++ b/scripts/dev.mjs
@@ -11,6 +11,8 @@ import { execa } from 'execa';
const _filename = fileURLToPath(import.meta.url);
const _dirname = dirname(_filename);
+const vitePort = process.env.VITE_PORT ? ["--strictPort", "--port", process.env.VITE_PORT] : ["--strictPort"];
+
await execa('pnpm', ['clean'], {
cwd: _dirname + '/../',
stdout: process.stdout,
@@ -41,7 +43,7 @@ execa('pnpm', ['--filter', 'backend', 'watch'], {
stderr: process.stderr,
});
-execa('pnpm', ['--filter', 'frontend', 'watch'], {
+execa('pnpm', ['--filter', 'frontend', 'watch', ...vitePort], {
cwd: _dirname + '/../',
stdout: process.stdout,
stderr: process.stderr,