diff --git a/.circleci/workflows.yml b/.circleci/workflows.yml index 686e662911a3..778537e0bfcb 100644 --- a/.circleci/workflows.yml +++ b/.circleci/workflows.yml @@ -30,6 +30,7 @@ mainBuildFilters: &mainBuildFilters - /^release\/\d+\.\d+\.\d+$/ # use the following branch as well to ensure that v8 snapshot cache updates are fully tested - 'update-v8-snapshot-cache-on-develop' + - 'lmiller/fixing-vite-windows' # usually we don't build Mac app - it takes a long time # but sometimes we want to really confirm we are doing the right thing @@ -68,6 +69,7 @@ windowsWorkflowFilters: &windows-workflow-filters or: - equal: [ develop, << pipeline.git.branch >> ] # use the following branch as well to ensure that v8 snapshot cache updates are fully tested + - equal: [ 'lmiller/fixing-vite-windows', << pipeline.git.branch >> ] - equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ] - matches: pattern: /^release\/\d+\.\d+\.\d+$/ @@ -134,7 +136,7 @@ commands: - run: name: Check current branch to persist artifacts command: | - if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* ]]; then + if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "release/"* && "$CIRCLE_BRANCH" != "lmiller/fixing-vite-windows" ]]; then echo "Not uploading artifacts or posting install comment for this branch." circleci-agent step halt fi diff --git a/npm/vite-dev-server/client/initCypressTests.js b/npm/vite-dev-server/client/initCypressTests.js index 57b983ca8fd2..f0602c119eb3 100644 --- a/npm/vite-dev-server/client/initCypressTests.js +++ b/npm/vite-dev-server/client/initCypressTests.js @@ -34,7 +34,9 @@ if (supportFile) { // Using relative path wouldn't allow to load tests outside Vite project root folder // So we use the "@fs" bit to load the test file using its absolute path -const testFileAbsolutePathRoute = `${devServerPublicPathRoute}/@fs${CypressInstance.spec.absolute}` +// Normalize path to not include a leading slash (different on Win32 vs Unix) +const normalizedAbsolutePath = CypressInstance.spec.absolute.replace(/^\//, '') +const testFileAbsolutePathRoute = `${devServerPublicPathRoute}/@fs/${normalizedAbsolutePath}` /* Spec file import logic */ // We need a slash before /src/my-spec.js, this does not happen by default.