@moneko/core 3.0.0-beta.121 → 3.0.0-beta.122

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.
@@ -1 +1 @@
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 s}from"./coverage.js";import{FRAMEWORK as m,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/${m}/lib/entry.js')).default;`,f=l?`import ${i?"* as 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":s,"@app/entry":`${a.normalizeCss?`import "@moneko/${m}/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;
1
+ import{accessSync as o,constants as p,existsSync as t}from"fs";import{join as e}from"path";import r 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 l}from"./utils.js";let c=t(e(a.alias["@"],"./index.ts")),u=`const renderApp = (await import('@moneko/${s}/lib/entry.js')).default;`,_="",f=u;c&&(_=`import ${i?"{mount as appMount,unmount as appUnMount} from ":""}"@/index.ts";`),a.rem?.designSize&&(_+=n),i?(_+="if (window.__POWERED_BY_QIANKUN__) {__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;}",f+=`if (!window.__POWERED_BY_QIANKUN__) {renderApp();}let unmountInstance = void 0;export async function mount(props) {${c?"appMount?.(props);":""}unmountInstance = renderApp(props);}export async function unmount(props) {${c?"appUnMount?.(props);":""}unmountInstance();}`):f+="renderApp();";let d={...a.virtualModule,"@app":r,"@app/fallback":"export default null","@app/coverage":m,"@app/entry":`${a.normalizeCss?`import "@moneko/${s}/lib/normalize.css";`:""}${_}${f}`};a.fallbackCompPath&&Object.assign(d,{"@app/fallback":`import Fallback from "${a.fallbackCompPath}";export default Fallback;`});let b={};try{let t=e(l("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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.0.0-beta.121",
3
+ "version": "3.0.0-beta.122",
4
4
  "description": "core",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",