@umijs/plugins 4.0.5 → 4.0.8

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,73 +1,92 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const path_1 = require("path");
4
- const plugin_utils_1 = require("umi/plugin-utils");
5
- /*
6
- As long as moment2dayjs is registered, moment will be replaced by dayjs.
7
- The presets that can adapt to antd is registered by default.
8
- When the user configures preset and plugins at the same time, we will merge them.
9
- */
10
- exports.default = (api) => {
11
- api.describe({
12
- key: 'moment2dayjs',
13
- config: {
14
- schema(joi) {
15
- return joi.object({
16
- preset: joi.string(),
17
- plugins: joi.array(),
18
- });
19
- },
20
- },
21
- enableBy: api.EnableBy.config,
22
- });
23
- const presets = {
24
- antd: [
25
- 'isSameOrBefore',
26
- 'isSameOrAfter',
27
- 'advancedFormat',
28
- 'customParseFormat',
29
- 'weekday',
30
- 'weekYear',
31
- 'weekOfYear',
32
- 'isMoment',
33
- 'localeData',
34
- 'localizedFormat',
35
- ],
36
- antdv3: [
37
- 'isSameOrBefore',
38
- 'isSameOrAfter',
39
- 'advancedFormat',
40
- 'customParseFormat',
41
- 'weekday',
42
- 'weekYear',
43
- 'weekOfYear',
44
- 'isMoment',
45
- 'localeData',
46
- 'localizedFormat',
47
- 'badMutable',
48
- ],
49
- };
50
- const getDayjsPlugins = (api) => {
51
- let { preset = 'antd', plugins = [] } = api.config.moment2dayjs || {};
52
- switch (preset) {
53
- case 'antd':
54
- return Array.from(new Set(presets['antd'].concat(plugins)));
55
- case 'antdv3':
56
- return Array.from(new Set(presets['antdv3'].concat(plugins)));
57
- case 'none':
58
- return [].concat(plugins);
59
- default:
60
- return [];
61
- }
62
- };
63
- // replace moment
64
- api.modifyConfig((memo) => {
65
- memo.alias.moment = (0, path_1.dirname)(require.resolve('dayjs/package.json'));
66
- return memo;
67
- });
68
- api.onGenerateFiles(() => {
69
- const plugins = getDayjsPlugins(api);
70
- const runtimeTpl = `
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
+
22
+ // moment2dayjs.ts
23
+ var moment2dayjs_exports = {};
24
+ __export(moment2dayjs_exports, {
25
+ default: () => moment2dayjs_default
26
+ });
27
+ module.exports = __toCommonJS(moment2dayjs_exports);
28
+ var import_path = require("path");
29
+ var import_plugin_utils = require("umi/plugin-utils");
30
+ var moment2dayjs_default = (api) => {
31
+ api.describe({
32
+ key: "moment2dayjs",
33
+ config: {
34
+ schema(joi) {
35
+ return joi.object({
36
+ preset: joi.string(),
37
+ plugins: joi.array()
38
+ });
39
+ }
40
+ },
41
+ enableBy: api.EnableBy.config
42
+ });
43
+ const presets = {
44
+ antd: [
45
+ "isSameOrBefore",
46
+ "isSameOrAfter",
47
+ "advancedFormat",
48
+ "customParseFormat",
49
+ "weekday",
50
+ "weekYear",
51
+ "weekOfYear",
52
+ "isMoment",
53
+ "localeData",
54
+ "localizedFormat"
55
+ ],
56
+ antdv3: [
57
+ "isSameOrBefore",
58
+ "isSameOrAfter",
59
+ "advancedFormat",
60
+ "customParseFormat",
61
+ "weekday",
62
+ "weekYear",
63
+ "weekOfYear",
64
+ "isMoment",
65
+ "localeData",
66
+ "localizedFormat",
67
+ "badMutable"
68
+ ]
69
+ };
70
+ const getDayjsPlugins = (api2) => {
71
+ let { preset = "antd", plugins = [] } = api2.config.moment2dayjs || {};
72
+ switch (preset) {
73
+ case "antd":
74
+ return Array.from(new Set(presets["antd"].concat(plugins)));
75
+ case "antdv3":
76
+ return Array.from(new Set(presets["antdv3"].concat(plugins)));
77
+ case "none":
78
+ return [].concat(plugins);
79
+ default:
80
+ return [];
81
+ }
82
+ };
83
+ api.modifyConfig((memo) => {
84
+ memo.alias.moment = (0, import_path.dirname)(require.resolve("dayjs/package.json"));
85
+ return memo;
86
+ });
87
+ api.onGenerateFiles(() => {
88
+ const plugins = getDayjsPlugins(api);
89
+ const runtimeTpl = `
71
90
  import dayjs from '{{{dayjsPath}}}';
72
91
  import antdPlugin from '{{{dayjsAntdPluginPath}}}';
73
92
 
@@ -81,16 +100,18 @@ dayjs.extend({{.}});
81
100
 
82
101
  dayjs.extend(antdPlugin);
83
102
  `;
84
- const dayjsAntdPluginPath = (0, plugin_utils_1.winPath)(require.resolve('antd-dayjs-webpack-plugin/src/antd-plugin'));
85
- const dayjsPath = (0, plugin_utils_1.winPath)((0, path_1.dirname)(require.resolve('dayjs/package.json')));
86
- api.writeTmpFile({
87
- path: 'runtime.tsx',
88
- content: plugin_utils_1.Mustache.render(runtimeTpl, {
89
- plugins,
90
- dayjsPath,
91
- dayjsAntdPluginPath,
92
- }),
93
- });
103
+ const dayjsAntdPluginPath = (0, import_plugin_utils.winPath)(require.resolve("antd-dayjs-webpack-plugin/src/antd-plugin"));
104
+ const dayjsPath = (0, import_plugin_utils.winPath)((0, import_path.dirname)(require.resolve("dayjs/package.json")));
105
+ api.writeTmpFile({
106
+ path: "runtime.tsx",
107
+ content: import_plugin_utils.Mustache.render(runtimeTpl, {
108
+ plugins,
109
+ dayjsPath,
110
+ dayjsAntdPluginPath
111
+ })
94
112
  });
95
- api.addEntryCodeAhead(() => [`import './plugin-moment2dayjs/runtime.tsx'`]);
113
+ });
114
+ api.addEntryCodeAhead(() => [`import './plugin-moment2dayjs/runtime.tsx'`]);
96
115
  };
116
+ // Annotate the CommonJS export names for ESM import in node:
117
+ 0 && (module.exports = {});
@@ -1,8 +1,41 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MODEL_EXPORT_NAME = exports.qiankunStateFromMasterModelNamespace = exports.qiankunStateForSlaveModelNamespace = exports.defaultHistoryType = exports.defaultMasterRootId = void 0;
4
- exports.defaultMasterRootId = 'root-master';
5
- exports.defaultHistoryType = 'browser';
6
- exports.qiankunStateForSlaveModelNamespace = '@@qiankunStateForSlave';
7
- exports.qiankunStateFromMasterModelNamespace = '@@qiankunStateFromMaster';
8
- exports.MODEL_EXPORT_NAME = 'useQiankunStateForSlave';
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // constants.ts
20
+ var constants_exports = {};
21
+ __export(constants_exports, {
22
+ MODEL_EXPORT_NAME: () => MODEL_EXPORT_NAME,
23
+ defaultHistoryType: () => defaultHistoryType,
24
+ defaultMasterRootId: () => defaultMasterRootId,
25
+ qiankunStateForSlaveModelNamespace: () => qiankunStateForSlaveModelNamespace,
26
+ qiankunStateFromMasterModelNamespace: () => qiankunStateFromMasterModelNamespace
27
+ });
28
+ module.exports = __toCommonJS(constants_exports);
29
+ var defaultMasterRootId = "root-master";
30
+ var defaultHistoryType = "browser";
31
+ var qiankunStateForSlaveModelNamespace = "@@qiankunStateForSlave";
32
+ var qiankunStateFromMasterModelNamespace = "@@qiankunStateFromMaster";
33
+ var MODEL_EXPORT_NAME = "useQiankunStateForSlave";
34
+ // Annotate the CommonJS export names for ESM import in node:
35
+ 0 && (module.exports = {
36
+ MODEL_EXPORT_NAME,
37
+ defaultHistoryType,
38
+ defaultMasterRootId,
39
+ qiankunStateForSlaveModelNamespace,
40
+ qiankunStateFromMasterModelNamespace
41
+ });
@@ -1,137 +1,163 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isMasterEnable = void 0;
4
- const fs_1 = require("fs");
5
- const path_1 = require("path");
6
- const plugin_utils_1 = require("umi/plugin-utils");
7
- const withTmpPath_1 = require("../utils/withTmpPath");
8
- const constants_1 = require("./constants");
9
- function isMasterEnable(opts) {
10
- var _a;
11
- const masterCfg = (_a = opts.userConfig.qiankun) === null || _a === void 0 ? void 0 : _a.master;
12
- if (masterCfg) {
13
- return masterCfg.enable !== false;
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __defProps = Object.defineProperties;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
+ var __spreadValues = (a, b) => {
13
+ for (var prop in b || (b = {}))
14
+ if (__hasOwnProp.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ if (__getOwnPropSymbols)
17
+ for (var prop of __getOwnPropSymbols(b)) {
18
+ if (__propIsEnum.call(b, prop))
19
+ __defNormalProp(a, prop, b[prop]);
14
20
  }
15
- return !!process.env.INITIAL_QIANKUN_MASTER_OPTIONS;
21
+ return a;
22
+ };
23
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
+ var __export = (target, all) => {
25
+ for (var name in all)
26
+ __defProp(target, name, { get: all[name], enumerable: true });
27
+ };
28
+ var __copyProps = (to, from, except, desc) => {
29
+ if (from && typeof from === "object" || typeof from === "function") {
30
+ for (let key of __getOwnPropNames(from))
31
+ if (!__hasOwnProp.call(to, key) && key !== except)
32
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
33
+ }
34
+ return to;
35
+ };
36
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
37
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
+
39
+ // master.ts
40
+ var master_exports = {};
41
+ __export(master_exports, {
42
+ default: () => master_default,
43
+ isMasterEnable: () => isMasterEnable
44
+ });
45
+ module.exports = __toCommonJS(master_exports);
46
+ var import_fs = require("fs");
47
+ var import_path = require("path");
48
+ var import_plugin_utils = require("umi/plugin-utils");
49
+ var import_withTmpPath = require("../utils/withTmpPath");
50
+ var import_constants = require("./constants");
51
+ function isMasterEnable(opts) {
52
+ var _a;
53
+ const masterCfg = (_a = opts.userConfig.qiankun) == null ? void 0 : _a.master;
54
+ if (masterCfg) {
55
+ return masterCfg.enable !== false;
56
+ }
57
+ return !!process.env.INITIAL_QIANKUN_MASTER_OPTIONS;
16
58
  }
17
- exports.isMasterEnable = isMasterEnable;
18
- exports.default = (api) => {
19
- api.describe({
20
- key: 'qiankun-master',
21
- enableBy: isMasterEnable,
22
- });
23
- api.addRuntimePlugin(() => {
24
- return [(0, withTmpPath_1.withTmpPath)({ api, path: 'masterRuntimePlugin.tsx' })];
25
- });
26
- api.modifyDefaultConfig((config) => ({
27
- ...config,
28
- mountElementId: constants_1.defaultMasterRootId,
29
- qiankun: {
30
- ...config.qiankun,
31
- master: {
32
- ...JSON.parse(process.env.INITIAL_QIANKUN_MASTER_OPTIONS || '{}'),
33
- ...(config.qiankun || {}).master,
34
- },
35
- },
36
- }));
37
- api.modifyRoutes((memo) => {
38
- Object.keys(memo).forEach((id) => {
39
- var _a;
40
- const route = memo[id];
41
- if (route.microApp) {
42
- const appName = route.microApp;
43
- const base = api.config.base || '/';
44
- const masterHistoryType = ((_a = api.config.history) === null || _a === void 0 ? void 0 : _a.type) || 'browser';
45
- const routeProps = route.microAppProps || {};
46
- const normalizedRouteProps = JSON.stringify(routeProps).replace(/"/g, "'");
47
- route.file = `(async () => {
59
+ var master_default = (api) => {
60
+ api.describe({
61
+ key: "qiankun-master",
62
+ enableBy: isMasterEnable
63
+ });
64
+ api.addRuntimePlugin(() => {
65
+ return [(0, import_withTmpPath.withTmpPath)({ api, path: "masterRuntimePlugin.tsx" })];
66
+ });
67
+ api.modifyDefaultConfig((config) => __spreadProps(__spreadValues({}, config), {
68
+ mountElementId: import_constants.defaultMasterRootId,
69
+ qiankun: __spreadProps(__spreadValues({}, config.qiankun), {
70
+ master: __spreadValues(__spreadValues({}, JSON.parse(process.env.INITIAL_QIANKUN_MASTER_OPTIONS || "{}")), (config.qiankun || {}).master)
71
+ })
72
+ }));
73
+ api.modifyRoutes((memo) => {
74
+ Object.keys(memo).forEach((id) => {
75
+ var _a;
76
+ const route = memo[id];
77
+ if (route.microApp) {
78
+ const appName = route.microApp;
79
+ const base = api.config.base || "/";
80
+ const masterHistoryType = ((_a = api.config.history) == null ? void 0 : _a.type) || "browser";
81
+ const routeProps = route.microAppProps || {};
82
+ const normalizedRouteProps = JSON.stringify(routeProps).replace(/"/g, "'");
83
+ route.file = `(async () => {
48
84
  const { getMicroAppRouteComponent } = await import('@@/plugin-qiankun-master/getMicroAppRouteComponent');
49
85
  return getMicroAppRouteComponent({ appName: '${appName}', base: '${base}', routePath: '${route.path}', masterHistoryType: '${masterHistoryType}', routeProps: ${normalizedRouteProps} })
50
86
  })()`;
51
- }
52
- });
53
- return memo;
54
- });
55
- // state model for slave app
56
- api.addRuntimePluginKey(() => [constants_1.MODEL_EXPORT_NAME]);
57
- api.register({
58
- key: 'addExtraModels',
59
- fn() {
60
- const { path, exports } = api.appData.appJS || {};
61
- return path && exports.includes(constants_1.MODEL_EXPORT_NAME)
62
- ? [
63
- `${path}#{"namespace":"${constants_1.qiankunStateForSlaveModelNamespace}","exportName":"${constants_1.MODEL_EXPORT_NAME}"}`,
64
- ]
65
- : [];
66
- },
87
+ }
67
88
  });
68
- function getFileContent(file) {
69
- return (0, fs_1.readFileSync)((0, path_1.join)(__dirname, '../../libs/qiankun/master', file), 'utf-8');
89
+ return memo;
90
+ });
91
+ api.addRuntimePluginKey(() => [import_constants.MODEL_EXPORT_NAME]);
92
+ api.register({
93
+ key: "addExtraModels",
94
+ fn() {
95
+ const { path, exports } = api.appData.appJS || {};
96
+ return path && exports.includes(import_constants.MODEL_EXPORT_NAME) ? [
97
+ `${path}#{"namespace":"${import_constants.qiankunStateForSlaveModelNamespace}","exportName":"${import_constants.MODEL_EXPORT_NAME}"}`
98
+ ] : [];
70
99
  }
71
- api.onGenerateFiles(() => {
72
- var _a;
73
- api.writeTmpFile({
74
- path: 'masterOptions.ts',
75
- content: `
76
- let options = ${JSON.stringify({
77
- masterHistoryType: ((_a = api.config.history) === null || _a === void 0 ? void 0 : _a.type) || constants_1.defaultHistoryType,
78
- base: api.config.base || '/',
79
- ...api.config.qiankun.master,
80
- })};
100
+ });
101
+ function getFileContent(file) {
102
+ return (0, import_fs.readFileSync)((0, import_path.join)(__dirname, "../../libs/qiankun/master", file), "utf-8");
103
+ }
104
+ api.onGenerateFiles(() => {
105
+ var _a;
106
+ api.writeTmpFile({
107
+ path: "masterOptions.ts",
108
+ content: `
109
+ let options = ${JSON.stringify(__spreadValues({
110
+ masterHistoryType: ((_a = api.config.history) == null ? void 0 : _a.type) || import_constants.defaultHistoryType,
111
+ base: api.config.base || "/"
112
+ }, api.config.qiankun.master))};
81
113
  export const getMasterOptions = () => options;
82
114
  export const setMasterOptions = (newOpts) => options = ({ ...options, ...newOpts });
83
- `,
84
- });
115
+ `
116
+ });
117
+ api.writeTmpFile({
118
+ path: "MicroAppLoader.tsx",
119
+ content: api.isPluginEnable("antd") ? getFileContent("AntdLoader.tsx") : `export default function Loader() { console.warn(\`[plugins/qiankun]: Seems like you'r not using @umijs/plugin-antd, you need to provide a custom loader or set autoSetLoading false to shut down this warning!\`); return null; }`
120
+ });
121
+ [
122
+ "common.ts",
123
+ "constants.ts",
124
+ "types.ts",
125
+ "masterRuntimePlugin.tsx",
126
+ "getMicroAppRouteComponent.tsx.tpl",
127
+ "ErrorBoundary.tsx",
128
+ "MicroApp.tsx",
129
+ "MicroAppWithMemoHistory.tsx"
130
+ ].forEach((file) => {
131
+ if (file.endsWith(".tpl")) {
85
132
  api.writeTmpFile({
86
- path: 'MicroAppLoader.tsx',
87
- // 开启了 antd 插件的时候,使用 antd 的 loader 组件,否则提示用户必须设置一个自定义的 loader 组件
88
- content: api.isPluginEnable('antd')
89
- ? getFileContent('AntdLoader.tsx')
90
- : `export default function Loader() { console.warn(\`[plugins/qiankun]: Seems like you'r not using @umijs/plugin-antd, you need to provide a custom loader or set autoSetLoading false to shut down this warning!\`); return null; }`,
91
- });
92
- [
93
- 'common.ts',
94
- 'constants.ts',
95
- 'types.ts',
96
- 'masterRuntimePlugin.tsx',
97
- 'getMicroAppRouteComponent.tsx.tpl',
98
- 'ErrorBoundary.tsx',
99
- 'MicroApp.tsx',
100
- 'MicroAppWithMemoHistory.tsx',
101
- ].forEach((file) => {
102
- if (file.endsWith('.tpl')) {
103
- api.writeTmpFile({
104
- path: file.replace(/\.tpl$/, ''),
105
- tpl: getFileContent(file),
106
- context: {
107
- dynamicRoot: false,
108
- hasModelPlugin: api.isPluginEnable('model'),
109
- // dynamicRoot:
110
- // api.config.exportStatic && api.config.exportStatic.dynamicRoot,
111
- },
112
- });
113
- }
114
- else {
115
- let content = getFileContent(file);
116
- if (!api.config.qiankun.externalQiankun) {
117
- content = content.replace(/from 'qiankun'/g, `from '${(0, plugin_utils_1.winPath)((0, path_1.dirname)(require.resolve('qiankun/package')))}'`);
118
- }
119
- api.writeTmpFile({
120
- path: file.replace(/\.tpl$/, ''),
121
- content: content
122
- .replace('__USE_MODEL__', api.isPluginEnable('model')
123
- ? `import { useModel } from '@@/plugin-model'`
124
- : `const useModel = null;`)
125
- .replace(/from 'lodash\//g, `from '${(0, plugin_utils_1.winPath)((0, path_1.dirname)(require.resolve('lodash/package')))}/`),
126
- });
127
- }
133
+ path: file.replace(/\.tpl$/, ""),
134
+ tpl: getFileContent(file),
135
+ context: {
136
+ dynamicRoot: false,
137
+ hasModelPlugin: api.isPluginEnable("model")
138
+ }
128
139
  });
140
+ } else {
141
+ let content = getFileContent(file);
142
+ if (!api.config.qiankun.externalQiankun) {
143
+ content = content.replace(/from 'qiankun'/g, `from '${(0, import_plugin_utils.winPath)((0, import_path.dirname)(require.resolve("qiankun/package")))}'`);
144
+ }
129
145
  api.writeTmpFile({
130
- path: 'index.ts',
131
- content: `
146
+ path: file.replace(/\.tpl$/, ""),
147
+ content: content.replace("__USE_MODEL__", api.isPluginEnable("model") ? `import { useModel } from '@@/plugin-model'` : `const useModel = null;`).replace(/from 'lodash\//g, `from '${(0, import_plugin_utils.winPath)((0, import_path.dirname)(require.resolve("lodash/package")))}/`)
148
+ });
149
+ }
150
+ });
151
+ api.writeTmpFile({
152
+ path: "index.ts",
153
+ content: `
132
154
  export { MicroApp } from './MicroApp';
133
155
  export { MicroAppWithMemoHistory } from './MicroAppWithMemoHistory';
134
- `,
135
- });
156
+ `
136
157
  });
158
+ });
137
159
  };
160
+ // Annotate the CommonJS export names for ESM import in node:
161
+ 0 && (module.exports = {
162
+ isMasterEnable
163
+ });