vite
vite copied to clipboard
fix: dynamic import path contain ../ and its own directory will not work
Description
fix: #9265
I think it should work properly
Additional context
What is the purpose of this pull request?
- [x] Bug fix
- [ ] New Feature
- [ ] Documentation update
- [ ] Other
Before submitting the PR, please make sure you do the following
- [x] Read the Contributing Guidelines.
- [x] Read the Pull Request Guidelines and follow the Commit Convention.
- [x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
- [x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g.
fixes #123
). - [x] Ideally, include relevant tests that fail without this PR but pass with it.
Does anyone know why the test information is omitted?
Does anyone know why the test information is omitted?
The same problem is present in the vitest VSCODE extension

Hi, are there any updates about this fix?
I still have a build error (Heroku)
-----> Build
Running build (yarn)
yarn run v1.22.19
$ vite build
vite v3.0.9 building for production...
transforming...
✓ 82 modules transformed.
Could not resolve '../../hooks/useIsSignedIn' from src/components/hocs/AuthProtected.jsx
error during build:
Error: Could not resolve '../../hooks/useIsSignedIn' from src/components/hocs/AuthProtected.jsx
at error (file:///tmp/build_370de0e6/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
at ModuleLoader.handleResolveId (file:///tmp/build_370de0e6/node_modules/rollup/dist/es/shared/rollup.js:22333:24)
at file:///tmp/build_370de0e6/node_modules/rollup/dist/es/shared/rollup.js:22296:26
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@zyakita please create a new issue against the latest version of Vite with a minimal reproduction. Thanks!