template icon indicating copy to clipboard operation
template copied to clipboard

Fix the error when importing TypeScript files in Svelte files

Open kissge opened this issue 3 years ago • 0 comments

As was reported in https://github.com/sveltejs/template/issues/244, when using the current template, importing a TypeScript file in Svelte files, e.g.

import { foo } from './utility';

causes this error:

[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)

Although the fix in this PR works, another workaround is posted on the issue, which might fit better.

Fix https://github.com/sveltejs/template/issues/244.

kissge avatar Feb 19 '22 06:02 kissge