From 1b077d10d86a6ed50f41d589df6dbf1bbd09fd23 Mon Sep 17 00:00:00 2001 From: Simon H <5968653+dummdidumm@users.noreply.github.com> Date: Sun, 13 Sep 2020 14:57:04 +0200 Subject: [PATCH] Add sourcemaps (#173) --- scripts/setupTypeScript.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/setupTypeScript.js b/scripts/setupTypeScript.js index f22663e..123fc57 100644 --- a/scripts/setupTypeScript.js +++ b/scripts/setupTypeScript.js @@ -80,7 +80,10 @@ while (( match = configEditor.exec(rollupConfig)) != null) { // Add TypeScript -rollupConfig = rollupConfig.replace("commonjs(),", 'commonjs(),\n\t\ttypescript({ sourceMap: !production }),') +rollupConfig = rollupConfig.replace( + 'commonjs(),', + 'commonjs(),\n\t\ttypescript({\n\t\t\tsourceMap: !production,\n\t\t\tinlineSources: !production\n\t\t}),' +); fs.writeFileSync(rollupConfigPath, rollupConfig) // Add TSConfig