vite icon indicating copy to clipboard operation
vite copied to clipboard

fix: dynamic import path contain ../ and its own directory will not work

Open Dunqing opened this issue 2 years ago • 2 comments

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.

Dunqing avatar Jul 25 '22 03:07 Dunqing

Does anyone know why the test information is omitted? image

Dunqing avatar Jul 28 '22 05:07 Dunqing

Does anyone know why the test information is omitted? image

The same problem is present in the vitest VSCODE extension

image

Dunqing avatar Jul 28 '22 05:07 Dunqing

Hi, are there any updates about this fix?

ahnpnl avatar Aug 16 '22 09:08 ahnpnl

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 avatar Sep 01 '22 13:09 zyakita

@zyakita please create a new issue against the latest version of Vite with a minimal reproduction. Thanks!

patak-dev avatar Sep 01 '22 14:09 patak-dev