-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Copy link
Labels
Description
Describe the bug
I am using import.meta.resolve to resolve configuration files and entry points while generating my vite config. I expect this to work, except it doesn't because vite appends /node_modules/.vite-temp to every path.
Reproduction
https://stackblitz.com/edit/vitejs-vite-sbaj8ewe?file=package.json&view=editor
Steps to reproduce
create a config that uses import.meta.resolve to locate something like a babel config file or an entry point
System Info
System:
OS: macOS 15.5
CPU: (16) arm64 Apple M3 Max
Memory: 52.94 GB / 128.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 24.0.1 - ~/.volta/tools/image/node/24.0.1/bin/node
Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
npm: 11.3.0 - ~/.volta/tools/image/node/24.0.1/bin/npm
pnpm: 10.12.4 - ~/.volta/tools/image/pnpm/10.12.4/bin/pnpm
bun: 1.2.17 - ~/.bun/bin/bun
Watchman: 2025.05.26.00 - /opt/homebrew/bin/watchmanUsed Package Manager
pnpm
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.
Reactions are currently unavailable