From 95a7a73d2a97c71f3de97f0882d81a5bd06348f0 Mon Sep 17 00:00:00 2001 From: Yusuke Kido Date: Sat, 19 Feb 2022 15:49:13 +0900 Subject: [PATCH] Fix the error when importing TypeScript files in Svelte files. Fix https://github.com/sveltejs/template/issues/244 --- scripts/setupTypeScript.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/setupTypeScript.js b/scripts/setupTypeScript.js index 133658af..18d426d1 100644 --- a/scripts/setupTypeScript.js +++ b/scripts/setupTypeScript.js @@ -71,7 +71,7 @@ rollupConfig = rollupConfig.replace( // Add TypeScript rollupConfig = rollupConfig.replace( 'commonjs(),', - 'commonjs(),\n\t\ttypescript({\n\t\t\tsourceMap: !production,\n\t\t\tinlineSources: !production\n\t\t}),' + 'commonjs(),\n\t\ttypescript({\n\t\t\tsourceMap: !production,\n\t\t\tinlineSources: !production,\n\t\t\trootDir: "./src"\n\t\t}),' ); fs.writeFileSync(rollupConfigPath, rollupConfig)