-
Notifications
You must be signed in to change notification settings - Fork 302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ReferenceError: module is not defined #87
Comments
Most likely it's a bug caused by SvelteKit's builtin Vite but I'm curious if anyone solved this problem in their SvelteKit apps. |
We have an example here https://github.com/bytedance/bytemd/blob/main/examples/svelte-kit/README.md But there seems a little problem with the SSR process. |
@pd4d10 Yep. I've tried to disable SSR both app-wide and on page-level according to https://kit.svelte.dev/docs#ssr-and-javascript-ssr but they didn't work for me. Finally, I found this error disappeared when previewing bundled version with sveltekit's node-adapter. |
@mivinci Did you get it working? Having the same problem. |
The problem with that example is that it is using WebPack to create a separate package that the example then imports. This isn't how most users of SvelteKit are going to try to consume the package. |
I am using bytemd in a SvelteKit app and errors occurred
Seems like Vite doesn't support CommonJS modules that bytemd imported. Has anyone encountered this situation or should I go SvelteKit and Vite for help?
The text was updated successfully, but these errors were encountered: