typescript-svelte-plugin
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -231,3 +231,6 @@ "use strict"; | ||
const readFile = this.projectService.host.readFile; | ||
this.projectService.host.readFile = (path) => { | ||
this.projectService.host.readFile = (path, encoding) => { | ||
if (!this.configManager.getConfig().enable) { | ||
return readFile(path, encoding); | ||
} | ||
// The following (very hacky) first two checks make sure that the ambient module definitions | ||
@@ -253,3 +256,3 @@ // that tell TS "every import ending with .svelte is a valid module" are removed. | ||
} | ||
else if ((0, utils_1.isSvelteFilePath)(path) && this.configManager.getConfig().enable) { | ||
else if ((0, utils_1.isSvelteFilePath)(path)) { | ||
this.logger.debug('Read Svelte file:', path); | ||
@@ -284,3 +287,3 @@ const svelteCode = readFile(path) || ''; | ||
else { | ||
return readFile(path); | ||
return readFile(path, encoding); | ||
} | ||
@@ -287,0 +290,0 @@ }; |
{ | ||
"name": "typescript-svelte-plugin", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "A TypeScript Plugin providing Svelte intellisense", | ||
@@ -5,0 +5,0 @@ "main": "dist/src/index.js", |
68137
1514