Skip to content

Commit

Permalink
fix: Allow absolute paths in indexHtmlFile (#28324)
Browse files Browse the repository at this point in the history
* fix: allow absolute paths in indexHtmlFile

* Update CHANGELOG.md

* Updated readme

---------

Co-authored-by: Ryan Manuel <[email protected]>
Co-authored-by: Jennifer Shehane <[email protected]>
Co-authored-by: Jordan <[email protected]>
  • Loading branch information
4 people committed Nov 21, 2023
1 parent 537642a commit dcd6a18
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion npm/webpack-dev-server/src/makeDefaultWebpackConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 <script type="module">. Live-reloading breaks without this option.
// We need to manually set the base here to `/__cypress/src/` so that static assets load with our proxy
...(framework === 'angular' ? { scriptLoading: 'module', base: '/__cypress/src/' } : {}),
Expand Down

0 comments on commit dcd6a18

Please sign in to comment.