mirror of https://github.com/alibaba/ice.git
chore: localize remote assets to reduce test time (#6566)
This commit is contained in:
parent
7924f2d1d5
commit
c53deef96e
|
|
@ -5,6 +5,7 @@ node_modules/
|
|||
dist/
|
||||
out/
|
||||
compiled/
|
||||
public/
|
||||
|
||||
# node 覆盖率文件
|
||||
coverage/
|
||||
|
|
|
|||
|
|
@ -8,5 +8,18 @@ export default defineConfig(() => ({
|
|||
icestark({
|
||||
type: 'framework',
|
||||
}),
|
||||
{
|
||||
setup({ onGetConfig }) {
|
||||
// Enable option `enableCopyPlugin`, so devserver can access public folder when run test.
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
onGetConfig((config) => {
|
||||
return {
|
||||
...config,
|
||||
enableCopyPlugin: true,
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}));
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
<!DOCTYPE html><html><head><meta charset="utf-8"><meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1"><meta name="viewport" content="width=device-width"><title>icestark</title><link rel="stylesheet" href="/page-seller/assets/index.css"></head><body><div id="ice-container"></div><script type="module" src="/page-seller/assets/index.js"></script><script type="module" src="/page-seller/assets/vendor.js"></script></body></html>
|
||||
|
|
@ -0,0 +1 @@
|
|||
.wrapper[data-v-123114aa]{font-family:Avenir,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-align:center;color:#2c3e50;margin-top:60px}a[data-v-3cf51fd6]{color:#42b983}label[data-v-3cf51fd6]{margin:0 .5em;font-weight:700}code[data-v-3cf51fd6]{background-color:#eee;padding:2px 4px;border-radius:4px;color:#304455}
|
||||
|
|
@ -0,0 +1 @@
|
|||
import{d as f,r as h,o as a,c,a as i,w as m,b as e,p as v,e as g,_ as b,f as p,g as H,t as k,h as C,i as d,j as F,k as V,l as I,m as x}from"./vendor.js";var _=(t,o)=>{const u=t.__vccOpts||t;for(const[s,r]of o)u[s]=r;return u};const l=t=>(v("data-v-123114aa"),t=t(),g(),t),N={class:"wrapper"},D=l(()=>e("img",{alt:"Vue logo",src:"https://gw.alicdn.com/imgextra/i2/O1CN01y9FKOg1f0OnH6Hew8_!!6000000003944-2-tps-200-200.png"},null,-1)),L=l(()=>e("br",null,null,-1)),P=p(" Home "),S=l(()=>e("br",null,null,-1)),j=p(" List "),A=l(()=>e("br",null,null,-1)),O=f({setup(t){const o=()=>{b.push("/")};return(u,s)=>{const r=h("router-link"),w=h("router-view");return a(),c("div",N,[D,L,i(r,{to:"/"},{default:m(()=>[P]),_:1}),S,i(r,{to:"/list"},{default:m(()=>[j]),_:1}),A,e("button",{onClick:o},"\u5FAE\u5E94\u7528\u95F4\u8DF3\u8F6C"),i(w)])}}});var y=_(O,[["__scopeId","data-v-123114aa"]]);const B=t=>(v("data-v-3cf51fd6"),t=t(),g(),t),E=B(()=>e("p",null,[e("a",{href:"https://v3.vuejs.org/",target:"_blank"}," Learn Vue 3 "),p(" | "),e("a",{href:"https://micro-frontends.ice.work/",target:"_blank"},"icestark Docs")],-1)),W=f({props:{msg:null},setup(t){const o=H(0);return(u,s)=>(a(),c("div",null,[e("h1",null,k(t.msg||"Hello Vite + icestark + Vue3!"),1),E,e("button",{type:"button",onClick:s[0]||(s[0]=r=>o.value++)},"count is: "+k(o.value),1)]))}});var R=_(W,[["__scopeId","data-v-3cf51fd6"]]);const T={};function K(t,o){return a(),c("h1",null,"List Page")}var M=_(T,[["render",K]]);const q={};function z(t,o){return a(),c("h1",null,"Detail Page")}var G=_(q,[["render",z]]);const J={};function Q(t,o){return a(),c("h1",null,"404 Page")}var U=_(J,[["render",Q]]);const X=()=>new Promise(t=>{F(),t(!0)}),$=()=>{const t=V(d()?I():"/");return C({history:t,routes:[{path:"/",component:R},{path:"/list",component:M},{path:"/detail",component:G},{path:"/:pathMatch(.*)",component:d()?()=>X():U}]})};let n=null;d()||(n=x(y),n.use($()),n.mount("#app"));function Z({container:t}){n=x(y),n.use($()),n.mount(t)}function tt(){n&&n.unmount()}export{Z as mount,tt as unmount};
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Vite App</title><link rel="stylesheet" href="/page-waiter/assets/main.css"></head><body><div id="app"></div><script type="module" src="/page-waiter/assets/main.js"></script></body></html>
|
||||
|
|
@ -8,12 +8,12 @@ export const icestark = defineFrameworkConfig(() => ({
|
|||
path: '/seller',
|
||||
title: '商家平台',
|
||||
loadScriptMode: 'import',
|
||||
entry: 'https://iceworks.oss-cn-hangzhou.aliyuncs.com/icestark/child-seller-ice-vite/index.html',
|
||||
entry: '/page-seller/index.html',
|
||||
}, {
|
||||
path: '/waiter',
|
||||
title: '小二平台',
|
||||
loadScriptMode: 'import',
|
||||
entry: 'https://iceworks.oss-cn-hangzhou.aliyuncs.com/icestark/child-vue3-vite/index.html',
|
||||
entry: '/page-waiter/index.html',
|
||||
}]),
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue