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
Sourcemaps are no longer being emitted to the output directory. This appears to be the result of the rollup 3 upgrade since that change made sourcemaps into proper assets within the bundle, and vite has existing code that removes assets from the bundle for SSR builds which was not updated to go along with this change.
Run npm install followed by npm run build and check the output produced in the ./dist folder. you will only see index.js and index.cjs, but there should also be index.js.map and index.cjs.map.
If you set ssr: false in the vite.config.ts file and re-run the steps above, the sourcemaps are produced correctly.
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
When enabling SSR mode by setting:
Sourcemaps are no longer being emitted to the output directory. This appears to be the result of the rollup 3 upgrade since that change made sourcemaps into proper assets within the bundle, and vite has existing code that removes assets from the bundle for SSR builds which was not updated to go along with this change.
I have fixed this in the following PR: #11343
Reproduction
https://stackblitz.com/edit/vitejs-vite-bqd6xy?file=vite.config.ts
Steps to reproduce
Run
npm install
followed bynpm run build
and check the output produced in the./dist
folder. you will only seeindex.js
andindex.cjs
, but there should also beindex.js.map
andindex.cjs.map
.If you set
ssr: false
in the vite.config.ts file and re-run the steps above, the sourcemaps are produced correctly.System Info
Used Package Manager
yarn
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: