You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importer is always the resolved full path with filename because we pre-resolve the imports (i.e. the file with import './dir' will already have been rewritten to import './dir/index.js').
Please make sure to only open issues when you reproduce it.
Describe the bug
In this line, the
ctx.path
may be a direcory.https://github.com/vuejs/vite/blob/6683bb8fb819c6f4935b40f25c2a377037e5ec7d/src/node/server/serverPluginModuleRewrite.ts#L129
But when you resolve relative import, you treat it as a file path.
https://github.com/vuejs/vite/blob/49a44b648f263ff058f730913ea1ee6c62e3cd2d/src/node/utils/pathUtils.ts#L16
For example, if
/dir/index.js
haveimport './utils'
, and browser request for/dir
, vite will try to find utils from/utils
instead of/dir/utils
The text was updated successfully, but these errors were encountered: