Closed mattcroat closed 1 month ago
The same problem
✘ [ERROR] Could not resolve "../core"
node_modules/.pnpm/shiki-magic-move@0.4.0_shiki@1.5.1_svelte@4.2.16_vue@3.4.27_typescript@5.3.2_/node_modules/shiki-magic-move/dist/svelte/ShikiMagicMove.svelte:22:58:
22 │ import { codeToKeyedTokens, createMagicMoveMachine } from "../core";
╵ ~~~~~~~~~
✘ [ERROR] Could not resolve "../core"
node_modules/.pnpm/shiki-magic-move@0.4.0_shiki@1.5.1_svelte@4.2.16_vue@3.4.27_typescript@5.3.2_/node_modules/shiki-magic-move/dist/svelte/ShikiMagicMovePrecompiled.svelte:23:45:
23 │ import { syncTokenKeys, toKeyedTokens } from "../core";
╵ ~~~~~~~~~
✘ [ERROR] Could not resolve "../renderer"
node_modules/.pnpm/shiki-magic-move@0.4.0_shiki@1.5.1_svelte@4.2.16_vue@3.4.27_typescript@5.3.2_/node_modules/shiki-magic-move/dist/svelte/ShikiMagicMoveRenderer.svelte:35:34:
35 │ import { MagicMoveRenderer } from "../renderer";
╵ ~~~~~~~~~~~~~
Imports can't be resolved
After the build, files are transformed from
.ts
to.mjs
files, so they can't be resolved inside the Svelte components.The fix is simple as adding the extension, which would at least make it work for the build.
No type definitions
TypeScript complains about the import.
The solution might be to include a separate type declaration file, but I'm not familiar with the build system.