Skip to content

Commit

Permalink
feat: 三方物料解耦 preview变量替换增加注释
Browse files Browse the repository at this point in the history
  • Loading branch information
rhlin committed May 11, 2024
1 parent c892c7a commit c71b24f
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export function replacePreviewImport(importMap, fileMap, originCdnPrefix) {
return {
imports: Object.fromEntries(
Object.entries(importMap.imports)?.map(([key, location]) => {
// 这里的替换占位符规则等同于packages/design-core/src/preview/src/preview/importMap.js, 两边修改需要同步
const url = location.replace('${VITE_CDN_DOMAIN}', originCdnPrefix).replace('${opentinyVueVersion}', '~3.11')
const matchRule = fileMap.find((rule) => url === rule.originUrl)
if (matchRule) {
Expand Down

0 comments on commit c71b24f

Please sign in to comment.