From 2226b2834aabc90eab532bd7cf86407e8c7248df Mon Sep 17 00:00:00 2001 From: Zachary Williams Date: Tue, 2 Aug 2022 17:45:30 -0500 Subject: [PATCH] fix: vite v3 not working with node >=17 (#23048) * fix: vite 3.0 not working with node >=17 * forgot to add system-test config * redundant map * make docker + npm happy * make npm config cache dir * revert system test changes --- npm/vite-dev-server/src/plugins/cypress.ts | 2 +- npm/vite-dev-server/src/resolveConfig.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/npm/vite-dev-server/src/plugins/cypress.ts b/npm/vite-dev-server/src/plugins/cypress.ts index ad45ff88716d..50998131686b 100644 --- a/npm/vite-dev-server/src/plugins/cypress.ts +++ b/npm/vite-dev-server/src/plugins/cypress.ts @@ -76,7 +76,7 @@ export const Cypress = ( indexHtmlContent = indexHtmlContent.replace( '', ` - ${scriptTagsToInject.map((script) => script.toString())} + ${scriptTagsToInject.join('')} `, ) diff --git a/npm/vite-dev-server/src/resolveConfig.ts b/npm/vite-dev-server/src/resolveConfig.ts index 2a22596eb815..2b798bb150dc 100644 --- a/npm/vite-dev-server/src/resolveConfig.ts +++ b/npm/vite-dev-server/src/resolveConfig.ts @@ -82,6 +82,7 @@ export const createViteDevServerConfig = async (config: ViteDevServerConfig, vit cypressConfig.cypressBinaryRoot, ], }, + host: '127.0.0.1', }, plugins: [ Cypress(config, vite),