Skip to content

Vitest cannot resolve imports using aliases #17685

Open
@julianctni

Description

@julianctni

What happened?

Hello,

yesterday I set up a completly new and empty quasar project with app-vite 2.0. After that I added testing (vitest) via quasar ext add @quasar/testing-unit-vitest as mentioned in the documentation. However, as soon as I import something from my source folder, I get this error message running the tests.

image

It seems like a problem with the folder aliases that cannot be resolved using vitest.

I hope there is an easy/quick solution. :)

Best regards and thanks for you work!
Julian

What did you expect to happen?

The imports should be resolved.

Reproduction URL

https://stackblitz.com/edit/stackblitz-starters-khocqz

How to reproduce?

  1. Go to the reproduction link
  2. Run yarn test:unit

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Project Creation (create-quasar)

Platforms/Browsers

No response

Quasar info output

No response

Relevant log output

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions