[Shiki] no CDN provider found
See original GitHub issuecode
import * as shiki from 'shiki';
const html = ref('');
shiki
.getHighlighter({
theme: props.theme,
})
.then((highlighter) => {
html.value = highlighter.codeToHtml(props.content, props.lang);
})
.catch(console.warn);
result
[Shiki] no CDN provider found, use `setCDN()` to specify the CDN for loading the resources before calling `getHighlighter()`
Issue Analytics
- State:
- Created 2 years ago
- Comments:17 (4 by maintainers)
Top Results From Across the Web
Shiki
Shiki is a beautiful Syntax Highlighter. It uses TextMate grammar to tokenize strings, and colors the tokens with VS Code themes. In short,...
Read more >What is a Content Delivery Network (CDN)? - Akamai
Content delivery networks, or CDNs, make online experiences faster and more reliable by delivering content closer to users. Learn more.
Read more >M109r clutch adjustment
Serial number locations. 800-969-7501 320-358-4019 customerservice@denniskirk. Suzuki M109R 2006-15 FMC109* Suzuki Boulevard C50, C90, M50 2004-08 FMC110* ...
Read more >Which CDN should I choose for users in China? - Mlytics
Not to worry, here are the 5 best CDN for China. ... Selecting the best Content Delivery Network (CDN) for users located in...
Read more >shiki-element - npm
A web component to render code using the Shiki library. ... There are no other projects in the npm registry using shiki-element.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Agree with @Sparkenstein. For now, as is written in this file, we can load assets by
setCDN('https://unpkg.com/shiki/')
manually. But it’s a little bit confusing, why not just considernode_modules/shiki
as a default assets folder 👻(or maybe set a default CDN)+1 for this, CDN feature should be optional in my opinion. especially for desktop apps created with electron, it’s not feasible to connect CDN everytime.
for now using
with vite worked for me, since vite serves the root directory. but this is temporary and will only work with vite-like bundlers AND in dev mode. in prod you will manually (somehow) have to copy shiki/dist to your dist.