@moneko/core 3.0.0-beta.118 → 3.0.0-beta.119
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
|
-
|
|
1
|
+
export default class{constructor(t){this.entryMatchCallback=t}apply(t){t.hooks.compilation.tap("AddEntryAttributeWebpackPlugin",a=>{let e=t.options.plugins.map(({constructor:t})=>t).find(t=>t&&"HtmlWebpackPlugin"===t.name);if(e){let t=e.getHooks(a);t.alterAssetTagGroups.tap("AddEntryAttributeWebpackPlugin",t=>(t.headTags.forEach(t=>{"script"===t.tagName&&this.entryMatchCallback(t.attributes.src)&&(t.attributes.entry=!0)}),t))}})}};
|
package/lib/virtual-modules.js
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
import{accessSync as o,constants as
|
|
2
|
-
${a.rem?.designSize?t:""}
|
|
3
|
-
await import('@moneko/${l}/lib/entry.js');`};a.fallbackCompPath&&Object.assign(i,{"@app/fallback":`import Fallback from "${a.fallbackCompPath}";export default Fallback;`});let c={};try{let r=m(s("site"),"./mdx-scope.ts");o(r,p.R_OK),c='import scope from "@/mdx-scope";export default scope;'}catch(o){c={}}Object.assign(i,{"@app/mdx-scope":c});export default i;
|
|
1
|
+
import{accessSync as o,constants as t}from"fs";import{join as p}from"path";import m from"./app.js";import a from"./common/rem.js";import{CONFIG as r}from"./common.js";import{coverage as e}from"./coverage.js";import{FRAMEWORK as i,isMicro as l}from"./process-env.js";import{resolveProgramPath as s}from"./utils.js";let c=r.rem?.designSize?a:"",n=`await import('@moneko/${i}/lib/entry.js');`;l&&(c+="if (window.__POWERED_BY_QIANKUN__) {__webpack_public_path__ = window.__INJECTED_PUBLIC_PATH_BY_QIANKUN__;}",n=`const { bootstrap, mount, unmount } = await import('@moneko/${i}/lib/entry.js');export { bootstrap, mount, unmount };`);let _={...r.virtualModule,"@app":m,"@app/fallback":"export default null","@app/coverage":e,"@app/entry":`${r.normalizeCss?`import "@moneko/${i}/lib/normalize.css";`:""}${c}${n}`};r.fallbackCompPath&&Object.assign(_,{"@app/fallback":`import Fallback from "${r.fallbackCompPath}";export default Fallback;`});let f={};try{let m=p(s("site"),"./mdx-scope.ts");o(m,t.R_OK),f='import scope from "@/mdx-scope";export default scope;'}catch(o){f={}}Object.assign(_,{"@app/mdx-scope":f});export default _;
|