This repository was archived by the owner on Aug 16, 2022. It is now read-only.
This repository was archived by the owner on Aug 16, 2022. It is now read-only.
btoa in css source break SSR #88
Open
Description
This line
if (${e(compiler.template.isProduction)} && css.map) {
// https://developer.chrome.com/devtools/docs/javascript-debugging
// this makes source maps inside style tags work properly in Chrome
code += '\\n/*# sourceURL=' + css.map.sources[0] + ' */'
// http://stackoverflow.com/a/26603875
code +=
'\\n/*# sourceMappingURL=data:application/json;base64,' +
btoa(unescape(encodeURIComponent(JSON.stringify(css.map)))) +
' */'
}
https://github.com/vuejs/vue-component-compiler/blob/master/src/assembler.ts#L116
breaks SSR because btoa is not available in the global namespace of node.
If you add a check here, SSR will work.
Metadata
Metadata
Assignees
Labels
No labels