Import error when using package imports in vite.config.js #18867
Labels
p4-important
Violate documented behavior or significantly improves performance (priority)
regression
The issue only appears after a new release
Describe the bug
When I use package imports in
vite.config.js
, Vite fails to load the configuration file and displays the following error:This used to work in v5. My best guess is that it is caused by #18509.
Reproduction
https://stackblitz.com/edit/stackblitz-starters-aszvug?file=package.json
Steps to reproduce
System Info
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 0 Bytes / 0 Bytes Shell: 1.0 - /bin/jsh Binaries: Node: 18.20.3 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 10.2.3 - /usr/local/bin/npm pnpm: 8.15.6 - /usr/local/bin/pnpm npmPackages: vite: ^6.0.2 => 6.0.2
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: