@moneko/core 3.0.0-beta.119 → 3.0.0-beta.120
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/app.js +1 -1
- package/lib/virtual-modules.js +1 -1
- package/package.json +1 -1
- package/typings/global.d.ts +1 -1
package/lib/app.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import o
|
|
1
|
+
import{existsSync as o}from"fs";import{join as e}from"path";import{CONFIG as t}from"./common.js";import r from"./html-plugin-option.js";import{APPTYPE as s,PACKAGENAME as m,PROGRAMPATH as i,isLibrary as p,programInfo as f}from"./process-env.js";import{toUpperCaseString as l}from"./utils.js";let n=p?"site":"src",a={...f,base:t.routeBaseName,routerMode:t.routerMode,mode:t.mode,locales:o(e(i,`./${n}/locales`)),favicon:r.favicon,prefixCls:t.prefixCls,theme:t.theme,type:s,persist:o(e(i,`./${n}/persist.ts`)),projectName:JSON.stringify(l(m)),iconfont:t.iconfont};export default a;
|
package/lib/virtual-modules.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{accessSync as o,constants as t}from"fs";import{join as
|
|
1
|
+
import{accessSync as o,constants as p,existsSync as t}from"fs";import{join as r}from"path";import e from"./app.js";import n from"./common/rem.js";import{CONFIG as a}from"./common.js";import{coverage as m}from"./coverage.js";import{FRAMEWORK as s,isMicro as i}from"./process-env.js";import{resolveProgramPath as c}from"./utils.js";let l=t(r(a.alias["@"],"./index.ts")),_=`const renderApp = (await import('@moneko/${s}/lib/entry.js')).default;`,f=l?`import ${i?"entry from ":""}"@/index.ts";`:"",u=_;a.rem?.designSize&&(f+=n),i?(f+="if (window.__POWERED_BY_QIANKUN__) {__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;}",u+=`if (!window.__POWERED_BY_QIANKUN__) {renderApp();}let unmountInstance = void 0;${l?"export async function bootstrap(props) {entry?.bootstrap?.(props);}":""}export async function mount(props) {${l?"entry?.mount?.(props);":""}unmountInstance = renderApp(props);}export async function unmount(props) {${l?"entry?.unmount?.(props);":""}unmountInstance();}`):u+="renderApp();";let d={...a.virtualModule,"@app":e,"@app/fallback":"export default null","@app/coverage":m,"@app/entry":`${a.normalizeCss?`import "@moneko/${s}/lib/normalize.css";`:""}${f}${u}`};a.fallbackCompPath&&Object.assign(d,{"@app/fallback":`import Fallback from "${a.fallbackCompPath}";export default Fallback;`});let b={};try{let t=r(c("site"),"./mdx-scope.ts");o(t,p.R_OK),b='import scope from "@/mdx-scope";export default scope;'}catch(o){b={}}Object.assign(d,{"@app/mdx-scope":b});export default d;
|
package/package.json
CHANGED
package/typings/global.d.ts
CHANGED