@cypress/vite-dev-server 5.0.2 → 5.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,13 +32,17 @@ if (supportFile) {
32
32
  })
33
33
  }
34
34
 
35
+ // Using relative path wouldn't allow to load tests outside Vite project root folder
36
+ // So we use the "@fs" bit to load the test file using its absolute path
37
+ const testFileAbsolutePathRoute = `${devServerPublicPathRoute}/@fs${CypressInstance.spec.absolute}`
38
+
35
39
  /* Spec file import logic */
36
40
  // We need a slash before /src/my-spec.js, this does not happen by default.
37
41
  importsToLoad.push({
38
- load: () => import(`${devServerPublicPathRoute}/${CypressInstance.spec.relative}`),
42
+ load: () => import(testFileAbsolutePathRoute),
39
43
  absolute: CypressInstance.spec.absolute,
40
44
  relative: CypressInstance.spec.relative,
41
- relativeUrl: `${devServerPublicPathRoute}/${CypressInstance.spec.relative}`,
45
+ relativeUrl: testFileAbsolutePathRoute,
42
46
  })
43
47
 
44
48
  if (!CypressInstance) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/vite-dev-server",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": "Launches Vite Dev Server for Component Testing",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -26,7 +26,7 @@
26
26
  "mocha": "^9.2.2",
27
27
  "sinon": "^13.0.1",
28
28
  "ts-node": "^10.9.1",
29
- "vite": "3.1.0",
29
+ "vite": "4.0.1",
30
30
  "vite-plugin-inspect": "0.4.3"
31
31
  },
32
32
  "files": [