Skip to content

Add vue application alias path resolve in Cypress #2465

Closed
@lossendae

Description

@lossendae

What problem does this feature solve?

I would like to import some javascript from my app in Cypress.

For now i have to use relative paths to do so:

import { CONST_1, CONST_2 } from '../../../../../whatever/path/to/file.js'

I would like to use the vue app alias like so :

import { CONST_1, CONST_2 } from '@/whatever/path/to/file.js'

Is there any way to achieve this ?

What does the proposed API look like?

We can already use alias path in Jest, it would be nice to be able to do the same with Cypress even if they don't use the same preprocessor (Browserify for Cypress i believe ?).

import { CONST_1, CONST_2 } from '@/whatever/path/to/file.js'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions