From fe6711f9dff681b3f60806a885397a0bd44d4e7b Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Thu, 5 Sep 2024 11:59:13 +0900 Subject: [PATCH] Clean build output before running test --- .../e2e-tests/test-applications/solidstart/package.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/solidstart/package.json b/dev-packages/e2e-tests/test-applications/solidstart/package.json index dfcf8a47402a..e831a14c1f47 100644 --- a/dev-packages/e2e-tests/test-applications/solidstart/package.json +++ b/dev-packages/e2e-tests/test-applications/solidstart/package.json @@ -3,14 +3,19 @@ "version": "0.0.0", "scripts": { "clean": "pnpx rimraf node_modules pnpm-lock.yaml .vinxi .output", + "clean:build": "pnpx rimraf .vinxi .output", "dev": "NODE_OPTIONS='--import ./src/instrument.server.mjs' vinxi dev", "build": "vinxi build", "//": [ "We are using `vinxi dev` to start the server because `vinxi start` is experimental and ", "doesn't correctly resolve modules for @sentry/solidstart/solidrouter.", - "This is currently not an issue outside of our repo. See: https://github.com/nksaraf/vinxi/issues/177" + "This is currently not an issue outside of our repo. See: https://github.com/nksaraf/vinxi/issues/177", + "We run the build command to ensure building succeeds. However, keeping", + "build output around slows down the vite dev server when using `@sentry/vite-plugin` so we clear it out", + "before actually running the tests.", + "Cleaning the build output should be removed once we can use `vinxi start`." ], - "preview": "HOST=localhost PORT=3030 NODE_OPTIONS='--import ./src/instrument.server.mjs' vinxi dev", + "preview": "pnpm clean:build && HOST=localhost PORT=3030 NODE_OPTIONS='--import ./src/instrument.server.mjs' vinxi dev", "start": "HOST=localhost PORT=3030 NODE_OPTIONS='--import ./src/instrument.server.mjs' vinxi start", "test:prod": "TEST_ENV=production playwright test", "test:build": "pnpm install && npx playwright install && pnpm build",