From 4e173fe10a3b01f100528b8b747dc66d5aa19cd8 Mon Sep 17 00:00:00 2001 From: Anthony Fu Date: Thu, 2 Jan 2025 14:25:47 +0800 Subject: [PATCH] fix: bundle externals --- packages/shiki/rollup.config.mjs | 10 ++-------- packages/shiki/test/bundle.test.ts | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/packages/shiki/rollup.config.mjs b/packages/shiki/rollup.config.mjs index af753af86..875a8d83b 100644 --- a/packages/shiki/rollup.config.mjs +++ b/packages/shiki/rollup.config.mjs @@ -27,15 +27,9 @@ const entries = [ ] const external = [ - '@shikijs/types', - '@shikijs/core', - '@shikijs/core/wasm-inlined', - '@shikijs/core/types', - '@shikijs/engine-javascript', - '@shikijs/engine-oniguruma', - '@shikijs/vscode-textmate', 'shiki/wasm', - /[/\\]src[/\\](langs|themes)[/\\]/g, + /^@shikijs[/\\].*/g, + /[/\\](langs|themes)[/\\]/g, ] const plugins = [ diff --git a/packages/shiki/test/bundle.test.ts b/packages/shiki/test/bundle.test.ts index 9958578ba..d302467cb 100644 --- a/packages/shiki/test/bundle.test.ts +++ b/packages/shiki/test/bundle.test.ts @@ -7,7 +7,7 @@ it('bundle-full', async () => { })) expect(highlighter.getLoadedLanguages().length) - .toMatchInlineSnapshot(`319`) + .toMatchInlineSnapshot(`320`) }) it('bundle-web', async () => {