@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
- import t from"html-webpack-plugin";export default class{constructor(t){this.entryMatchCallback=t}apply(a){a.hooks.compilation.tap("AddEntryAttributeWebpackPlugin",e=>{let r=a.options.plugins.find(a=>a instanceof t);if(r){let t=r.getHooks(e);t.alterAssetTagGroups.tap("AddEntryAttributeWebpackPlugin",t=>(t.headTags.forEach(t=>{"script"===t.tagName&&"string"==typeof t.attributes?.src&&this.entryMatchCallback(t.attributes.src)&&(t.attributes.entry=!0)}),t))}})}};
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))}})}};
@@ -1,3 +1 @@
1
- import{accessSync as o,constants as p}from"fs";import{join as m}from"path";import r from"./app.js";import t from"./common/rem.js";import{CONFIG as a}from"./common.js";import{coverage as e}from"./coverage.js";import{FRAMEWORK as l}from"./process-env.js";import{resolveProgramPath as s}from"./utils.js";let i={...a.virtualModule,"@app":r,"@app/fallback":"export default null","@app/coverage":e,"@app/entry":`${a.normalizeCss?`import "@moneko/${l}/lib/normalize.css";`:""}
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 _;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneko/core",
3
- "version": "3.0.0-beta.118",
3
+ "version": "3.0.0-beta.119",
4
4
  "description": "core",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",