Skip to content

Commit

Permalink
fix: htmlCode key
Browse files Browse the repository at this point in the history
这个错误会导致使用一些特殊的名称时(如:aaa-bbb)在编译时会失败
  • Loading branch information
frg2089 authored Sep 19, 2024
1 parent cf99f2e commit 6facf86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function genProdWebviewCode(cache: Record<string, string>, webview?: WebviewOpti

const cacheCode = /* js */ `const htmlCode = {
${Object.keys(cache)
.map(s => `${s}: \`${handleHtmlCode(cache[s])}\`,`)
.map(s => `'${s}': \`${handleHtmlCode(cache[s])}\`,`)
.join('\n')}
};`;

Expand Down

0 comments on commit 6facf86

Please sign in to comment.