Im using Svelte + Typescript and trying to import Pins plugin but get unexpected token 'export'.
Nb: I have set "allowJs": true on my tsconfig.json file
Reproduction
Code:
import { onMount } from 'svelte'
import { Pins } from '@fancyapps/ui/dist/panzoom/panzoom.pins.esm.js'
onMount(() => {
new Panzoom(mapContainer, options, {Pins})
}
Run:
npm run dev
Terminal:
SyntaxError: Unexpected token 'export'
at internalCompileFunction (node:internal/vm:73:18)
at wrapSafe (node:internal/modules/cjs/loader:1176:20)
at Module._compile (node:internal/modules/cjs/loader:1218:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
at Module.load (node:internal/modules/cjs/loader:1117:32)
at Module._load (node:internal/modules/cjs/loader:958:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:169:29)
at ModuleJob.run (node:internal/modules/esm/module_job:194:25)
Describe the bug
Im using Svelte + Typescript and trying to import Pins plugin but get unexpected token 'export'.
Nb: I have set "allowJs": true on my tsconfig.json file
Reproduction
Code:
Run:
npm run dev
Terminal:
Additional context
No response