Skip to content
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

import issue of lz-string in 0.49.16 #1861

Open
zillionare opened this issue Sep 10, 2024 · 4 comments
Open

import issue of lz-string in 0.49.16 #1861

zillionare opened this issue Sep 10, 2024 · 4 comments

Comments

@zillionare
Copy link

Describe the bug

This is an old bug (#1348 ), but it reappeared in version 0.49.16 again, when I try to enable monaco editor.

Minimal reproduction

Steps to reproduce the behavior:

the source md:

start = datetime.date(2023, 1, 1)
end = datetime.date(2023, 12, 31)
barss = load_bars(start, end)
barss.tail()

monaco configuration(theme/setup/monaco.ts):

import { defineMonacoSetup } from '@slidev/types'

export default defineMonacoSetup(async (monaco) => {
    // use `monaco` to configure
})

I have compared my local Monaco.vue with your repo (main branch, latest version), seems like the version has rolled back:

// latest in main branch
<script setup lang="ts">
import { debounce } from '@antfu/utils'
import lz from 'lz-string'

in #1348 , it was:

图片

Not sure if this cause the issue.

Environment

  • Slidev version: 0.49.16
  • Browser: firefox
  • OS: ubuntu focal
  • node: 22.8

If you are using Slidev globally (i.e. npx slidev or npm i -g slidev), please try to reproduce the issue in a local project (i.e. npm create slidev@latest).

@KermanX
Copy link
Member

KermanX commented Sep 11, 2024

Does this happen in the latest version?

@zillionare
Copy link
Author

with version 0.49.29, the issue still exists:

slide failed to load SyntaxError: The requested module 'http://192.168.100.5:3030/@fs/apps/slidev_themes/node_modules/lz-string/libs/lz-string.js?v=e101dc9b' doesn't provide an export named: 'default'

my shiki settings(not sure if it's related):

// import { transformerMetaWordHighlight, transformerNotationDiff } from '@shikijs/transformers'
import { defineShikiSetup } from '@slidev/types'

console.log("configure shiki from landscape-jade")
export default defineShikiSetup(() => {
    return {
        themes: {
            dark: 'min-dark',
            light: 'min-light',
        }
        // transformers: [
        //     transformerNotationDiff(),
        //     transformerMetaWordHighlight(),
        // ]
    }
})

the issue exists no matter the lines are commented out or not.

@zillionare
Copy link
Author

Will this will be fixed in recent release? It will cause both magic-move and monaco editor not work.

If you need help on reproduction, please let me know.

@KermanX
Copy link
Member

KermanX commented Oct 13, 2024

Yes, I used the latest release recently, and didn;t encounter this problem. Can this be reproduced in https://sli.dev/new ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants