We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05024a6 commit f149c62Copy full SHA for f149c62
packages/typescript-plugin/src/svelte-snapshots.ts
@@ -308,8 +308,11 @@ export class SvelteSnapshotManager {
308
this.logger.log('Successfully read Svelte file contents of', path);
309
return result.code;
310
} catch (e) {
311
- this.logger.log('Error loading Svelte file:', path);
+ this.logger.log('Error loading Svelte file:', path, ' Using fallback.');
312
this.logger.debug('Error:', e);
313
+ // Return something either way, else "X is not a module" errors will appear
314
+ // in the TS files that use this file.
315
+ return 'export default class extends Svelte2TsxComponent<any,any,any> {}';
316
}
317
} else {
318
return readFile(path);
0 commit comments