所以...
我正在尝试使用 Rollup 构建一个带有 Svelte 和 Typescript 的应用程序,当我尝试构建我的 Svelte 组件时,我似乎无法让它编译.ts包含在.svelte组件中的我的文件。
我不断收到此错误:
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
src/ui/pages/files-page/utils/mapPaths.ts (1:12)
1: import type { PathMapping } from '~/types/path.d';
^
Run Code Online (Sandbox Code Playgroud)
这是我的FilesPage.svelte,包括mapPaths.ts文件:
[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
src/ui/pages/files-page/utils/mapPaths.ts (1:12)
1: import type { PathMapping } from '~/types/path.d';
^
Run Code Online (Sandbox Code Playgroud)
和我的mapPaths.ts文件:
import type { …Run Code Online (Sandbox Code Playgroud)