Skip to content

Bug: Weird Vite chunk map sources #68

@IamFastre

Description

@IamFastre

Describe the bug
I keep getting this annoying error message in my dev console:

Not found: /node_modules/@microsoft/fetch-event-source/src/parse.ts
Not found: /node_modules/@microsoft/fetch-event-source/src/fetch.ts

I did some investigating and found that this chunk map is generated

// node_modules/.vite/deps/chunk-6H7Z5HH6.js.map
{
  "version": 3,
  "sources": ["../../@microsoft/fetch-event-source/src/parse.ts", "../../@microsoft/fetch-event-source/src/fetch.ts"],
  "sourcesContent": [null, null],
  "mappings":  /* long string */,
  "names": ["_a"]
}

which doesn't exist, this causes my app to try to reoptimize the dependencies, so some unnecessary server restarts.

To Reproduce

  1. Use Vite with Svelte 5?
  2. Open the dev build site and volià

Expected behavior
Not to send those messages or generate this incorrect chunk

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome
  • Version: latest
  • Node: 22

Additional context
I know the issue might just be from the @microsoft/fetch-event-source package, and I made an issue there, but the project seems to be abandoned

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingseenI've seen and read this issue and I'll try find some time soon to work on it.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions