@moneko/core 3.19.1-beta.0 → 3.19.1-beta.2
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/plugin/module-federation.mjs +1 -1
- package/lib/vm/info.d.mts +0 -1
- package/lib/vm/info.mjs +1 -1
- package/package.json +1 -1
- package/typings/global.d.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"webpack";import r from"./external-remotes.mjs";import{CONFIG as t}from"../config.mjs";import
|
|
1
|
+
import e from"webpack";import r from"./external-remotes.mjs";import{CONFIG as t}from"../config.mjs";import s from"../utils/require.mjs";import{resolveProgram as o}from"../utils/index.mjs";let{NormalModuleReplacementPlugin:i,container:{ModuleFederationPlugin:a}}=e,m={},l={},n={},p=t.moduleFederation?.map(e=>{if(Array.isArray(e.remotes))for(let r=0,t=e.remotes.length;r<t;r++){let t=e.remotes[r],s=t.alias||t.name,o=t.filename||"remote_entry.js";if(n[s]=`${t.name}@${t.host}/${o}`,Array.isArray(t.library))for(let e=0,r=t.library.length;e<r;e++)m[t.library[e]]=`${s}/${t.library[e]}`}if(Array.isArray(e.exposes))for(let r=0,t=e.exposes.length;r<t;r++){let t=e.exposes[r];"string"==typeof t?l[`./${t.toString()}`]=s.resolve(t.startsWith(".")?o(t):t):"[object Object]"===Object.prototype.toString.call(t)&&(l[`./${t.name}`]=s.resolve(t.path.startsWith(".")?o(t.path):t.path))}return new a({filename:"remote_entry.js",...e,remotes:n,exposes:l})});p.length>0&&(p.push(new r),p.push(new i(/(.*)/,e=>{m[e.request]&&(e.request=m[e.request])}))),t.env.injectRemoteReactRefresh=Object.keys(m).includes("react-dom");export default p;
|
package/lib/vm/info.d.mts
CHANGED
package/lib/vm/info.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{CONFIG as e}from"../config.mjs";import
|
|
1
|
+
import{CONFIG as e}from"../config.mjs";import{description as r,author as o,repository as t,APPTYPE as s,PACKAGENAME as m,PACKAGEVERSION as i,SSR as p}from"../process-env.mjs";import{convertToCamelCase as n}from"../utils/index.mjs";let a="string"==typeof o,f={name:m,projectName:n(m),ssr:p,version:i,base:e.basename,type:s,routerMode:e.routerMode,prefixCls:e.prefixCls,theme:e.theme,description:r,author:a?{name:o}:o,repository:a?{url:t}:t};export default f;
|
package/package.json
CHANGED
package/typings/global.d.ts
CHANGED
|
@@ -158,7 +158,7 @@ export declare type ConfigType = {
|
|
|
158
158
|
| false;
|
|
159
159
|
/** 环境变量, 可通过 process.env 获取 */
|
|
160
160
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
161
|
-
env
|
|
161
|
+
env: Record<string, any>;
|
|
162
162
|
/**
|
|
163
163
|
* @default
|
|
164
164
|
* 开发模式: 'cheap-module-source-map'
|