Open benaltair opened 3 years ago
It is probably using the normal esm module which expects a node environment currently. There is a browser module, I don't know if there is a way to tell vite which to use. I am yet to add the new entrypoints to mdsvex but it does have a browser field.
I got around this by using:
import * as mdsvex from 'mdsvex/dist/browser-umd';
Using proper ESM export paths might fix this.
When including
import { compile } from 'mdsvex';
in a route I immediately get the following error:SyntaxError: The requested module '/@id/__vite-browser-external:path' does not provide an export named 'join'
This happens without using
compile
anywhere and it immediately fixed when removing theimport
.Running Svelte Kit 1.0.0-next.103 with standard (for Kit so far) config.
did you ever figure this out?
did you ever figure this out?
@techydad05 Unfortunately not, I just went with a different solution entirely.
Same issue here. Error import path__default, { join } from 'path';
.
Svelte v 3.46.4.
I need compile
because there are no markdown files in my repo, I fetch markdown via api
Unfortunately MDSeveX is a show stopper on my repo. Hope it gets solved soon :-)
Following https://gist.github.com/FbN/0e651105937c8000f10fefdf9ec9af3d vite build runs without problems.
When including
import { compile } from 'mdsvex';
in a route I immediately get the following error:This happens without using
compile
anywhere and it immediately fixed when removing theimport
.Running Svelte Kit 1.0.0-next.103 with standard (for Kit so far) config.