diff --git a/cli/CHANGELOG.md b/cli/CHANGELOG.md index 49da6eb71390..7d35cb4de91d 100644 --- a/cli/CHANGELOG.md +++ b/cli/CHANGELOG.md @@ -10,6 +10,7 @@ _Released 6/17/2025 (PENDING)_ **Bugfixes:** - Fixed an issue when using `Cypress.stop()` where a run may be aborted prior to receiving the required runner events causing Test Replay to not be available. Addresses [#31781](https://github.com/cypress-io/cypress/issues/31781). +- Fixed missing support for setting an absolute path for `component.indexHtmlFile` in `@cypress/webpack-dev-server`. Fixes [#31819](https://github.com/cypress-io/cypress/issues/31819). ## 14.4.1 diff --git a/npm/webpack-dev-server/src/CypressCTWebpackPlugin.ts b/npm/webpack-dev-server/src/CypressCTWebpackPlugin.ts index c80f3ab8c294..bcc7a4bd7586 100644 --- a/npm/webpack-dev-server/src/CypressCTWebpackPlugin.ts +++ b/npm/webpack-dev-server/src/CypressCTWebpackPlugin.ts @@ -118,8 +118,9 @@ export class CypressCTWebpackPlugin { // TODO: don't use a sync fs method here // eslint-disable-next-line no-restricted-syntax const utimesSync: UtimesSync = inputFileSystem.fileSystem.utimesSync ?? fs.utimesSync + const indexHtmlFilePath = path.isAbsolute(this.indexHtmlFile) ? this.indexHtmlFile : path.join(this.projectRoot, this.indexHtmlFile) - utimesSync(path.join(this.projectRoot, this.indexHtmlFile), new Date(), new Date()) + utimesSync(indexHtmlFilePath, new Date(), new Date()) } /**