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

Fix shiki deprecation warning #5

Merged
merged 1 commit into from Mar 11, 2024
Merged

Fix shiki deprecation warning #5

merged 1 commit into from Mar 11, 2024

Conversation

ghost
Copy link

@ghost ghost commented Mar 10, 2024

Starting slidev with the latest shiki version would produce the following warning:

[slidev] loadTheme in setup/shiki.ts is deprecated. Pass directly the theme name it's supported by Shiki. For custom themes, load it manually via JSON.parse(fs.readFileSync(path, 'utf-8')) and pass the raw JSON object instead.

This commit fixes the warning and also removes a redundant slash in develompment configuration.

Starting slidev with the latest shiki version would produce the
following warning:

[slidev] `loadTheme` in `setup/shiki.ts` is deprecated. Pass directly
the theme name it's supported by Shiki. For custom themes, load it
manually via `JSON.parse(fs.readFileSync(path, 'utf-8'))` and pass the
raw JSON object instead.

This commit fixes the warning and also removes a redundant slash in
develompment configuration.
@estruyf
Copy link
Owner

estruyf commented Mar 11, 2024

Thanks @fgrandel for the fix!

@estruyf estruyf merged commit f14fa91 into estruyf:main Mar 11, 2024
@estruyf
Copy link
Owner

estruyf commented Mar 11, 2024

Version 0.0.16 just got released and includes your fix. 💪

@ghost ghost deleted the fix/shiki-deprecation-warning branch March 11, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants