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
I would assume users haven't done this often, but I just realized it's possible to enable node's source map for Vite's config import. When it's enabled, file reference is off since we moved bundle file to node_modules/.vite-temp#18509 but source map sources entries are still relative from cwd.
On Vite 5
$ NODE_OPTIONS=--enable-source-maps npx vite
Trace: test
at f2 (/my/cwd/vite.config.ts:10:11)
at f1 (/my/cwd/vite.config.ts:6:3)
at <anonymous> (/my/cwd/vite.config.ts:13:1)
On Vite 6
$ NODE_OPTIONS=--enable-source-maps npx vite
Trace: test
at f2 (/my/cwd/node_modules/.vite-temp/vite.config.ts:10:11)
at f1 (/my/cwd/node_modules/.vite-temp/vite.config.ts:6:3)
at <anonymous> (/my/cwd/node_modules/.vite-temp/vite.config.ts:13:1)
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.
Describe the bug
I would assume users haven't done this often, but I just realized it's possible to enable node's source map for Vite's config import. When it's enabled, file reference is off since we moved bundle file to
node_modules/.vite-temp
#18509 but source mapsources
entries are still relative from cwd.On Vite 5
On Vite 6
Reproduction
https://github.com/hi-ogawa/reproductions/tree/main/vite-config-bundle-source-map
Steps to reproduce
Cannot reproduce on stackblitz but you can test locally by downloading https://stackblitz.com/github/hi-ogawa/reproductions/tree/main/vite-config-bundle-source-map?file=README.md
System Info
Used Package Manager
pnpm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: