The [name]-legacy-[hash].js
file generated by vite@4.x and @vitejs/plugin-legacy does not have a sourcemap
#11693
Closed
7 tasks done
Labels
p4-important
Violate documented behavior or significantly improves performance (priority)
plugin: legacy
regression
The issue only appears after a new release
Describe the bug
vite@4.x
could not generate a soucemap file for the[filename]-legacy-[hash].js
file generated by@vitejs/plugin-legacy
, butvite@3.x
could successfully generate the corresponding sourcemap file.I'm not sure if it's
vite
or@vitejs/plugin-legacy
that's causing this problem.I've listed two links to reproduce it below. One uses
vite@4.0.4
and the other usesvite@3.2.5
. Both versions of@vitejs/plugin-legacy
are 3.0.1. They have the exact same configuration, and I didn't forget to addsourcemap: true
to the configuration file.Reproduction
https://stackblitz.com/edit/vitejs-v4-sourcemap-issue?file=package.json
Steps to reproduce
npm run build
dist/assets/
index-[hash].js
has a sourcemap file namedindex-[hash].js.map
. But there is no sourcemap file forindex-legacy-[hash].js
. (even though Vite lists its size in output for me)The sourcemap file corresponding to
index-legacy-[hash].js
invite@3.2.5
can be successfully generated. You can check the reproduction link located at https://stackblitz.com/edit/vitejs-v3-sourcemap-issue?file=package.jsonSystem Info
Used Package Manager
npm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: