-
Notifications
You must be signed in to change notification settings - Fork 6
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
Import aliases stopped working from @marko/vite@4.1.5 onwards #133
Comments
@vwong FYI the issue isn't that import aliases are not working, it's specifically that The reason this was added was to (somewhat hackily) improve support with webpack and lasso based apps which for If you change your alias from eg However I think we could update this alias to be less aggressive, eg |
I'll also add that it may make more sense for you to use package json imports for this since it's essentially intended to replace a lot of this aliasing stuff. Eg "imports": {
"#app/*": "./src/*.ts"
} and then import "~/thing";
// becomes
import "#app/thing"; |
Thanks for the tip. I've can now use package.json imports with @marko/vite@4.1.10. |
Additional tip: Make sure to update |
@vwong do you have this configured? https://www.typescriptlang.org/docs/handbook/modules/reference.html#packagejson-imports-and-self-name-imports |
Version: 4.1.5 - 4.1.10
I'm trying to use import aliases https://vitejs.dev/config/shared-options#resolve-alias.
This was working fine in @marko/vite@4.1.4 and earlier, but is broken in every version from 4.1.5 onwards.
A minimal reproduction repo is available https://github.com/vwong/marko-vite-bug
The text was updated successfully, but these errors were encountered: