We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Suppose I have an aliased directory with index file:
// alias-dir/index.ts import { msg } from '../import-from-parent'; export const msg2 = msg + ' from Alias';
I have defined alias as:
alias: { '/@alias/': path.resolve(__dirname, './src/alias-dir/') }
The runtime fails with: GET http://localhost:3001/import-from-parent net::ERR_ABORTED 404 (Not Found)
GET http://localhost:3001/import-from-parent net::ERR_ABORTED 404 (Not Found)
This is because aliased dirs are put on the root level while serving, hence breaking their relationship chain.
https://github.com/ashubham/vite-bug-1
vite
The text was updated successfully, but these errors were encountered:
fix(dev): resolve correct relative path for alias dir internal import…
6088771
… outside files fix vitejs#396
fix(dev): resolve correct outside relative imports from aliased dir (#…
cae1038
…407) fix #396
Successfully merging a pull request may close this issue.
Describe the bug
Suppose I have an aliased directory with index file:
I have defined alias as:
The runtime fails with:
GET http://localhost:3001/import-from-parent net::ERR_ABORTED 404 (Not Found)
This is because aliased dirs are put on the root level while serving, hence breaking their relationship chain.
Reproduction
https://github.com/ashubham/vite-bug-1
System Info
vite
version: 0.20.7The text was updated successfully, but these errors were encountered: