typescript-svelte-plugin 0.3.34 → 0.3.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/src/config-manager.d.ts +2 -0
- package/dist/src/config-manager.js +2 -1
- package/dist/src/index.js +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -24,7 +24,10 @@ Then add it to your `tsconfig.json` or `jsconfig.json`:
|
|
|
24
24
|
"compilerOptions": {
|
|
25
25
|
...
|
|
26
26
|
"plugins": [{
|
|
27
|
-
"name": "typescript-svelte-plugin"
|
|
27
|
+
"name": "typescript-svelte-plugin",
|
|
28
|
+
// the following options can be set additionally; they are optional; their default values are listed here
|
|
29
|
+
"enabled": true, // enables this plugin
|
|
30
|
+
"assumeIsSvelteProject": false // if true, skip detection and always assume it's a Svelte project
|
|
28
31
|
}]
|
|
29
32
|
}
|
|
30
33
|
}
|
package/dist/src/index.js
CHANGED
|
@@ -12,7 +12,8 @@ function init(modules) {
|
|
|
12
12
|
let resolvedSvelteTsxFiles;
|
|
13
13
|
function create(info) {
|
|
14
14
|
const logger = new logger_1.Logger(info.project.projectService.logger);
|
|
15
|
-
if (!
|
|
15
|
+
if (!info.config?.assumeIsSvelteProject &&
|
|
16
|
+
!isSvelteProject(info.project.getCompilerOptions())) {
|
|
16
17
|
logger.log('Detected that this is not a Svelte project, abort patching TypeScript');
|
|
17
18
|
return info.languageService;
|
|
18
19
|
}
|