From dcd6a18d9b43707a240101696e7b718f97380149 Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 21 Nov 2023 04:49:27 +0100 Subject: [PATCH] fix: Allow absolute paths in indexHtmlFile (#28324) * fix: allow absolute paths in indexHtmlFile * Update CHANGELOG.md * Updated readme --------- Co-authored-by: Ryan Manuel Co-authored-by: Jennifer Shehane Co-authored-by: Jordan --- cli/CHANGELOG.md | 1 + npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index bb7e1e0e5c84..320cfadcc511 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -10,6 +10,7 @@ _Released 11/21/2023 (PENDING)_ **Bugfixes:** +- We now allow absolute paths when setting `component.indexHtmlFile` in the Cypress config. Fixes [#27750](https://github.com/cypress-io/cypress/issues/27750). - Fixed an issue where dynamic intercept aliases now show with alias name instead of "no alias" in driver. Addresses [#24653](https://github.com/cypress-io/cypress/issues/24653) - Fixed an issue where [aliasing individual requests](https://docs.cypress.io/api/commands/intercept#Aliasing-individual-requests) with `cy.intercept()` led to an error when retrieving all of the aliases with `cy.get(@alias.all)` . Addresses [#25448](https://github.com/cypress-io/cypress/issues/25448) - The URL of the application under test and command error "Learn more" links now open externally instead of in the Cypress-launched browser. Fixes [#24572](https://github.com/cypress-io/cypress/issues/24572). diff --git a/npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts b/npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts index 28726ece76c3..bbed2620e112 100644 --- a/npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts +++ b/npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts @@ -81,7 +81,7 @@ export function makeCypressWebpackConfig ( }, plugins: [ new (HtmlWebpackPlugin as typeof import('html-webpack-plugin-5'))({ - template: indexHtmlFile ? path.join(projectRoot, indexHtmlFile) : undefined, + template: indexHtmlFile ? path.isAbsolute(indexHtmlFile) ? indexHtmlFile : path.join(projectRoot, indexHtmlFile) : undefined, // Angular generates all of it's scripts with