From edb7847e950af5c5ef57f9582a85dccdc48e8111 Mon Sep 17 00:00:00 2001 From: Alex Yang Date: Tue, 4 Jul 2023 13:37:06 +0800 Subject: [PATCH] test: use static server (#2996) --- apps/web/package.json | 5 +++-- package.json | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/web/package.json b/apps/web/package.json index 445282592d..dd8bef1e4e 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -4,8 +4,9 @@ "version": "0.7.0-canary.31", "scripts": { "dev": "next dev", - "build": "next build", - "start": "ts-node-esm server.mts" + "build": "next build && next export", + "start": "NODE_ENV=development next start", + "static-server": "ts-node-esm server.mts" }, "dependencies": { "@affine-test/fixtures": "workspace:*", diff --git a/package.json b/package.json index b178e3f718..1441bc1e00 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "build:infra": "yarn nx run-many -t build -p plugin-infra infra", "build:plugins": "yarn nx run-many -t build -p @affine/bookmark-block", "build:storybook": "yarn nx build @affine/storybook", - "start:web-static": "yarn workspace @affine/web start", + "start:web-static": "yarn workspace @affine/web static-server", "start:storybook": "yarn exec serve apps/storybook/storybook-static -l 6006", "serve:test-static": "yarn exec serve tests/fixtures --cors -p 8081", "lint": "eslint . --ext .js,mjs,.ts,.tsx --cache",