mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-29 10:29:19 +08:00
chore: vite 模式下 moible 预览资源引用改成源码 (#6483)
This commit is contained in:
parent
dfb6587b87
commit
e7c5b73d0e
@ -19,7 +19,11 @@ export default function transformMobileHtml(options: {} = {}): Plugin {
|
||||
file.path === '/examples/index.html'
|
||||
) {
|
||||
html = html.replace(/href=('|")(.*?)\1/g, (_, quote, value) => {
|
||||
if (
|
||||
if (/^amis\/lib\/themes\/(.*)\.css$/.test(value)) {
|
||||
return `href=${quote}../../packages/amis-ui/scss/themes/${RegExp.$1}.scss${quote}`;
|
||||
} else if (/^amis\/lib\/helper\.css$/.test(value)) {
|
||||
return `href=${quote}../../packages/amis-ui/scss/helper.scss${quote}`;
|
||||
} else if (
|
||||
/^(?:amis|amis\-core|amis\-formula|amis\-ui|office\-viewer)/.test(
|
||||
value
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user