-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)regressionThe issue only appears after a new releaseThe issue only appears after a new release
Description
Describe the bug
Importing a directory using import
won't fallback to the index.js file anymore.
Get the following error:
I created a very simple repo for an easy reproduction.
I noticed that the issue started at version 5.1.0, more specifically with version 5.1.0-beta.4.
Reproduction
https://github.com/charlesmass2/vite-index-fallback-fail
Steps to reproduce
Run npm install
followed by npm run dev
System Info
System:
OS: Linux 6.5 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
CPU: (20) x64 13th Gen Intel(R) Core(TM) i7-13700H
Memory: 7.28 GB / 31.05 GB
Container: Yes
Shell: 5.1.16 - /bin/bash
Binaries:
Node: 20.3.1 - /usr/bin/node
npm: 9.6.7 - /usr/bin/npm
Browsers:
Chrome: 121.0.6167.139
npmPackages:
@vitejs/plugin-vue: ^5.0.3 => 5.0.3
vite: 5.1.0 => 5.1.0
This is also reproduced in Alpine docker container.
Used Package Manager
npm
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
aurelienShizen, buqiyuan and SamuelTrimble
Metadata
Metadata
Assignees
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)regressionThe issue only appears after a new releaseThe issue only appears after a new release