vite-plugin-top-level-await icon indicating copy to clipboard operation
vite-plugin-top-level-await copied to clipboard

vite-plugin-top-level-await breaks source map generation in Vite

Open fixpunkt opened this issue 2 years ago • 4 comments

So, we've noticed that our source maps were broken since switching to Vite. Most of the generated bundles were missing the //# sourceMappingURL=... annotation.

We ended up having to deactivate all our Vite plugins one by one, and this one turned out to be the culprit. Unfortunately, I have not done any further digging so I cannot offer any further insight, but I still thought it prudent to open this issue so others who run across the same problem might find it.

Is this a known issue in general or does this work for everyone else?

fixpunkt avatar Aug 10 '23 13:08 fixpunkt

Yes. I'm sorry it's broken. I didn't handle source-map.

Menci avatar Aug 10 '23 19:08 Menci

I had the same problem. I need to produce source-map in my production code and this plugin messed with the sourcemap creation .

csakis avatar Aug 24 '23 03:08 csakis

Is there a fix to be expected for this any time soon?

thor-juhasz avatar Sep 27 '23 10:09 thor-juhasz

But I have no idea of how to implement this...

Menci avatar Dec 10 '23 08:12 Menci