Skip to content

New svelte-kit issues #158

Closed
Closed
@antonha

Description

@antonha

Hi! First and foremost, thanks for maintaining this library. Really helpful!

There seems to be some new issues around svelte-kit and ESM imports. I have looked at the previous two issues around this - this seems to be popping up again with newer versions of svelte-kit.

Steps to reproduce:

  1. Go into the svelte-highlight/examples/sveltekit folder
  2. Run yarn upgrade && yarn install (example commit at antonha@25efe8d)
  3. Run yarn dev
  4. Go to localhost:3000

I've added an example commit

Expected behavior would of course be to see the example. Actual behavior is that an error message is shown:

500

module is not defined

ReferenceError: module is not defined
    at /node_modules/highlight.js/lib/core.js:2500:1
    at instantiateModule (svelte-highlight/examples/sveltekit/node_modules/vite/dist/node/chunks/dep-cb562f8f.js:68783:166)

It seems like a lot of whack-a-mole with issues from svelte-kit? I am not that good of a front-end engineer, so I have a hard time really understanding these issues. Mostly reporting to see if I'm crazy or not.

Again, thanks for this library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions