Open dhbaird opened 1 year ago
The extra slash gets inserted in the call to typescript transpileModule()
.
os.EOL
yields different values in node vs bun and seems to be the source of the newline problem:
"\n"
in node"\\n"
in bunQuick reproducer:
echo 'console.log(JSON.stringify(require("os").EOL));' > oseol.cjs ; node oseol.cjs ; bun oseol.cjs
# >>>
# "\n"
# "\\n"
Quick workaround, set this:
tsconfig.json --> { "compilerOptions": { "newLine": "lf" } }
The svelte-preprocessor seems to have two issues when used with Bun. This might also be a Bun or other issue; I'm not sure yet :)
Versions:
EDIT: added: typescript 4.8.2