hashmd: SyntaxError: Unexpected token export when trying to build SvelteKit
I have ran into this error when trying to build my SvelteKit app:
`export { mathSsr as default }; ^^^^^^
SyntaxError: Unexpected token ‘export’ at Object.compileFunction (node:vm:352:18) at wrapSafe (node:internal/modules/cjs/loader:1031:15) at Module._compile (node:internal/modules/cjs/loader:1065:27) at Object.Module._extensions…js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:196:29) at ModuleJob.run (node:internal/modules/esm/module_job:183:25) at async Loader.import (node:internal/modules/esm/loader:178:24) at async Promise.all (index 1) [SyntaxError: Unexpected token ‘export’] `
When I remove mathSsr the same error appears in gfm and other plugins. Is there any way to fix this? I am using the newest SvelteKit version.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (13 by maintainers)
Commits related to this issue
- feat: use mjs to support svelte kit (#181) closes #180 — committed to jcccn/bytemd by M4TY 2 years ago
Yes, I am gonna do it right away.