Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ssr): emit js sourcemaps for ssr builds #11343

Merged
merged 2 commits into from Dec 31, 2022

Commits on Dec 12, 2022

  1. fix(ssr): emit js sourcemaps for ssr builds

    Rollup 3 switched the way sourcemaps were handled to be more consistent between the in-memory representation and what ultimately gets emitted to disk. Part of this change was moving the sourcemaps themselves to be assets within the bundle.
    
    At the same time, vite's `generateBundle` hook for the `assetPlugin` is configured to delete assets within the bundle (with the exception of "ssr-manifest.json"). Since `.js.map` files are now considered assets within the bundle at this stage, vite is removing the sourcemaps from the bundle when `build.ssr = true` and they never wind up on disk.
    
    This change adds an additional check to see if the file ends with `.js.map`, `.cjs.map`, or `.mjs.map` and it will leave these files in the bundle so that they are emitted to the outDir when the bundle is written.
    Adam Hines committed Dec 12, 2022
    Copy the full SHA
    d1911d6 View commit details
    Browse the repository at this point in the history

Commits on Dec 30, 2022

  1. chore: applying review feedback

    Adam Hines committed Dec 30, 2022
    Copy the full SHA
    4349592 View commit details
    Browse the repository at this point in the history