typescript-svelte-plugin 0.3.44 → 0.3.45
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/dist/src/utils.js +7 -0
- package/package.json +1 -1
package/dist/src/utils.js
CHANGED
|
@@ -217,6 +217,13 @@ function hasNodeModule(startPath, module) {
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
function isSvelteProject(project) {
|
|
220
|
+
// internal api, the way to check requires checking the files config in tsconfig.json
|
|
221
|
+
// so we can't reimplement it without reading the tsconfig.json again
|
|
222
|
+
// The solution project is mostly just a container we don't need to patch it
|
|
223
|
+
// and having any files in this project cause TSServer to send config error while it originally won't
|
|
224
|
+
if (project.isSolution?.()) {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
220
227
|
const projectDirectory = getProjectDirectory(project);
|
|
221
228
|
if (projectDirectory) {
|
|
222
229
|
return hasNodeModule(projectDirectory, 'svelte');
|