Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to resolve module import "@shared/**" #637

Closed
brmdbr opened this issue Jul 28, 2020 · 2 comments
Closed

Failed to resolve module import "@shared/**" #637

brmdbr opened this issue Jul 28, 2020 · 2 comments

Comments

@brmdbr
Copy link

brmdbr commented Jul 28, 2020

I have some trouble importing constans/enums in my project. My project is scructured like this:

image

client: vite/vuejs
server: back-end

I try to do the import like this:
image

I get this error:
image

@shared is defined like this in the tsconfig:
image

I read I should do something with resolvers but I couldn't get it to work, there also is no documentation for it. Hopefully someone here can help me.

@underfin
Copy link
Member

underfin commented Jul 29, 2020

The alias is supported in vite, but not support one alias reflect multi source.You can take a look with https://github.com/vitejs/vite/blob/master/src/node/config.ts#L67

@underfin
Copy link
Member

underfin commented Aug 26, 2020

Duplicate with #88. Maybe #88 (comment) this can help you out.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants