@cypress/vite-dev-server
Advanced tools
Comparing version 5.0.4 to 5.0.5
@@ -12,2 +12,3 @@ "use strict"; | ||
const path_1 = tslib_1.__importDefault(require("path")); | ||
const gte_1 = tslib_1.__importDefault(require("semver/functions/gte")); | ||
const constants_1 = require("./constants"); | ||
@@ -54,2 +55,3 @@ const index_1 = require("./plugins/index"); | ||
function makeCypressViteConfig(config, vite) { | ||
var _a, _b, _c; | ||
const { cypressConfig: { projectRoot, devServerPublicPathRoute, supportFile, cypressBinaryRoot, isTextTerminal, }, specs, } = config; | ||
@@ -61,3 +63,3 @@ // Vite caches its output in the .vite directory in the node_modules where vite lives. | ||
}))); | ||
return { | ||
const viteConfig = { | ||
root: projectRoot, | ||
@@ -67,2 +69,4 @@ base: `${devServerPublicPathRoute}/`, | ||
esbuildOptions: { | ||
// We are using Vite 4.2.0+, so `incremental` doesn't exist in the types | ||
// @ts-expect-error | ||
incremental: true, | ||
@@ -95,2 +99,5 @@ plugins: [ | ||
cypressBinaryRoot, | ||
// Allow in monorepo: https://vitejs.dev/config/server-options.html#server-fs-allow | ||
// Supported from Vite v3 - add null check for v2 users. | ||
(_a = vite.searchForWorkspaceRoot) === null || _a === void 0 ? void 0 : _a.call(vite, process.cwd()), | ||
], | ||
@@ -105,2 +112,8 @@ }, host: '127.0.0.1' }, (isTextTerminal | ||
}; | ||
if (vite.version && (0, gte_1.default)(vite.version, '4.2.0')) { | ||
// We are using Vite 4.2.0+, so `incremental` doesn't exist in the types | ||
// @ts-expect-error | ||
(_c = (_b = viteConfig.optimizeDeps) === null || _b === void 0 ? void 0 : _b.esbuildOptions) === null || _c === void 0 ? true : delete _c.incremental; | ||
} | ||
return viteConfig; | ||
} |
{ | ||
"name": "@cypress/vite-dev-server", | ||
"version": "5.0.4", | ||
"version": "5.0.5", | ||
"description": "Launches Vite Dev Server for Component Testing", | ||
@@ -21,3 +21,4 @@ "main": "index.js", | ||
"find-up": "6.3.0", | ||
"node-html-parser": "5.3.3" | ||
"node-html-parser": "5.3.3", | ||
"semver": "^7.3.2" | ||
}, | ||
@@ -30,3 +31,3 @@ "devDependencies": { | ||
"ts-node": "^10.9.1", | ||
"vite": "4.0.1", | ||
"vite": "4.2.0", | ||
"vite-plugin-inspect": "0.4.3" | ||
@@ -33,0 +34,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28682
497
4
+ Addedsemver@^7.3.2
+ Addedsemver@7.6.3(transitive)