Skip to content

Open in IDE does not work when preprocessor uses a different root directory than the project root #32809

@ryanthemanuel

Description

@ryanthemanuel

Current behavior

If you use a different root directory than the project root in your preprocessor, for example:

  const options = {
    webpackOptions: {
      context: path.resolve(__dirname, 'cypress'),
    }
  }

  on('file:preprocessor', webpack(options))

This will cause source maps to look in the wrong place for the absolute file (which is necessary for when you want to open the IDE or view the code inline for cy.prompt). As a result, you will not be able to use the Open in IDE functionality

Desired behavior

No response

Test code to reproduce

See above for the config

Cypress Version

all

Debug Logs

Other

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions