Created
February 14, 2021 19:51
-
-
Save Fedia/ae974af06846f7deb28b842ec1e9b138 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hacky Rollup plugin to remove source maps from Svelte components compiled for SSR | |
const killSSRmaps = { | |
renderChunk(code) { | |
return { | |
code: code.replace(/,[\s\n]*map:\s*(["'])\{.+?\}\1/g, ""), | |
}; | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment