cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.79k stars 3.17k forks source link

`devServerPublicPathRoute` omitted from `ConfigOptions` #29633

Open trbagley-gresham opened 3 months ago

trbagley-gresham commented 3 months ago

Current behavior

When setting devServerPublicPathRoute in defineConfig, TypeScript complains that the property isn't valid despite it being documented.

Desired behavior

TypeScript should accept devServerPublicPathRoute as a valid property of component in defineConfig.

Test code to reproduce

Set devServerPublicPathRoute in cypress.config.ts:

export default defineConfig({
  component: {
    devServer: {
      framework: 'react',
      bundler: 'vite'
    }
  },
  devServerPublicPathRoute: '',
});

Cypress Version

13.11.0

Node version

20.11.1

Operating System

macOS 14.5

Debug Logs

No response

Other

No response

AtofStryker commented 3 months ago

Hi @trbagley-gresham. Thank you for opening an issue. I think this may have been oversight on my end when publicly exposing the option since right now its configured to be an internal option https://github.com/cypress-io/cypress/blob/develop/packages/config/src/options.ts#L530

jennifer-shehane commented 3 months ago

@AtofStryker Shouldn't this be within the component object of the config? The example shows it as being set outside of the component object.

trbagley-gresham commented 3 months ago

@jennifer-shehane That's correct, my mistake, although the same happens when devServerPublicPathRoute is placed within the component object. TypeScript tsc doesn't appear to report any issues though.