@umijs/plugins 4.0.0-canary.20220727.1 → 4.0.0-canary.20220729.1

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/dist/access.js CHANGED
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
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
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // access.ts
22
+ // src/access.ts
23
23
  var access_exports = {};
24
24
  __export(access_exports, {
25
25
  default: () => access_default
package/dist/analytics.js CHANGED
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // analytics.ts
19
+ // src/analytics.ts
20
20
  var analytics_exports = {};
21
21
  __export(analytics_exports, {
22
22
  default: () => analytics_default
package/dist/antd.js CHANGED
@@ -33,7 +33,7 @@ var __copyProps = (to, from, except, desc) => {
33
33
  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));
34
34
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
35
 
36
- // antd.ts
36
+ // src/antd.ts
37
37
  var antd_exports = {};
38
38
  __export(antd_exports, {
39
39
  default: () => antd_default
package/dist/dva.js CHANGED
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
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
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // dva.ts
22
+ // src/dva.ts
23
23
  var dva_exports = {};
24
24
  __export(dva_exports, {
25
25
  default: () => dva_default,
package/dist/icons.js CHANGED
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // icons.ts
19
+ // src/icons.ts
20
20
  var icons_exports = {};
21
21
  __export(icons_exports, {
22
22
  default: () => icons_default
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // initial-state.ts
19
+ // src/initial-state.ts
20
20
  var initial_state_exports = {};
21
21
  __export(initial_state_exports, {
22
22
  default: () => initial_state_default
package/dist/layout.js CHANGED
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
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
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // layout.ts
22
+ // src/layout.ts
23
23
  var layout_exports = {};
24
24
  __export(layout_exports, {
25
25
  default: () => layout_default
@@ -247,17 +247,36 @@ const { formatMessage } = useIntl();
247
247
  api.writeTmpFile({
248
248
  path: "types.d.ts",
249
249
  content: `
250
- import type { ProLayoutProps } from "${pkgPath || "@ant-design/pro-layout"}";
250
+ import type { ProLayoutProps, HeaderProps } from "${pkgPath || "@ant-design/pro-layout"}";
251
251
  ${hasInitialStatePlugin ? `import type InitialStateType from '@@/plugin-initialState/@@initialState';
252
252
  type InitDataType = ReturnType<typeof InitialStateType>;
253
253
  ` : "type InitDataType = any;"}
254
-
255
- export type RunTimeLayoutConfig = (
256
- initData: InitDataType,
257
- ) => ProLayoutProps & {
258
- childrenRender?: (dom: JSX.Element, props: ProLayoutProps) => React.ReactNode,
259
- noAccessible?: JSX.Element,
260
- notFound?: JSX.Element,
254
+ import { IConfigFromPlugins } from '@@/core/pluginConfig';
255
+
256
+ export type RunTimeLayoutConfig = (initData: InitDataType) => Omit<
257
+ ProLayoutProps,
258
+ 'rightContentRender'
259
+ > & {
260
+ childrenRender?: (dom: JSX.Element, props: ProLayoutProps) => React.ReactNode;
261
+ noAccessible?: JSX.Element;
262
+ notFound?: JSX.Element;
263
+ logout?: (initialState: InitDataType['initialState']) => Promise<void> | void;
264
+ rightContentRender?: (
265
+ headerProps: HeaderProps,
266
+ dom: JSX.Element,
267
+ props: {
268
+ userConfig: IConfigFromPlugins['layout'];
269
+ runtimeConfig: RunTimeLayoutConfig;
270
+ loading: InitDataType['loading'];
271
+ initialState: InitDataType['initialState'];
272
+ setInitialState: InitDataType['setInitialState'];
273
+ },
274
+ ) => JSX.Element;
275
+ rightRender?: (
276
+ initialState: InitDataType['initialState'],
277
+ setInitialState: InitDataType['setInitialState'],
278
+ runtimeConfig: RunTimeLayoutConfig,
279
+ ) => JSX.Element;
261
280
  };
262
281
  `
263
282
  });
package/dist/locale.js CHANGED
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
36
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
37
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
 
39
- // locale.ts
39
+ // src/locale.ts
40
40
  var locale_exports = {};
41
41
  __export(locale_exports, {
42
42
  default: () => locale_default,
@@ -202,8 +202,8 @@ var locale_default = (api) => {
202
202
  api.writeTmpFile({
203
203
  path: "index.ts",
204
204
  content: `
205
- export { addLocale, setLocale, getLocale, getIntl, useIntl, injectIntl, formatMessage, FormattedMessage, getAllLocales } from './localeExports.ts';
206
- export { SelectLang } from './SelectLang.tsx';
205
+ export { addLocale, setLocale, getLocale, getIntl, useIntl, injectIntl, formatMessage, FormattedMessage, getAllLocales } from './localeExports';
206
+ export { SelectLang } from './SelectLang';
207
207
  `
208
208
  });
209
209
  });
package/dist/mf.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import type { IApi } from 'umi';
2
+ export default function mf(api: IApi): void;
package/dist/mf.js ADDED
@@ -0,0 +1,197 @@
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
+ // src/mf.ts
20
+ var mf_exports = {};
21
+ __export(mf_exports, {
22
+ default: () => mf
23
+ });
24
+ module.exports = __toCommonJS(mf_exports);
25
+ var import_fs = require("fs");
26
+ var import_path = require("path");
27
+ var import_plugin_utils = require("umi/plugin-utils");
28
+ var { isEmpty } = import_plugin_utils.lodash;
29
+ var mfSetupPathFileName = "_mf_setup-public-path.js";
30
+ var mfAsyncEntryFileName = "asyncEntry.ts";
31
+ function mf(api) {
32
+ api.describe({
33
+ key: "mf",
34
+ config: {
35
+ schema(Joi) {
36
+ return Joi.object({
37
+ name: Joi.string(),
38
+ remotes: Joi.array().items(Joi.object({
39
+ aliasName: Joi.string(),
40
+ name: Joi.string().required(),
41
+ entry: Joi.string(),
42
+ entries: Joi.object(),
43
+ keyResolver: Joi.string()
44
+ })),
45
+ shared: Joi.object(),
46
+ library: Joi.object()
47
+ });
48
+ }
49
+ },
50
+ enableBy: api.EnableBy.config
51
+ });
52
+ api.modifyWebpackConfig(async (config, { webpack }) => {
53
+ const exposes = await constructExposes();
54
+ const remotes = formatRemotes();
55
+ const shared = getShared();
56
+ if (isEmpty(remotes) && isEmpty(exposes)) {
57
+ api.logger.warn("ModuleFederation exposes and remotes are empty, plugin will not work");
58
+ return config;
59
+ }
60
+ if (!isEmpty(remotes)) {
61
+ if (!api.config.mfsu) {
62
+ changeUmiEntry(config);
63
+ }
64
+ }
65
+ let name = "_";
66
+ if (!isEmpty(exposes)) {
67
+ name = mfName();
68
+ addMFEntry(config, name, (0, import_path.join)(api.paths.absTmpPath, "plugin-mf", mfSetupPathFileName));
69
+ }
70
+ const mfConfig = {
71
+ name,
72
+ remotes,
73
+ filename: "remote.js",
74
+ exposes,
75
+ shared,
76
+ library: api.config.mf.library
77
+ };
78
+ const { ModuleFederationPlugin } = webpack.container;
79
+ config.plugins.push(new ModuleFederationPlugin(mfConfig));
80
+ api.logger.debug(`ModuleFederationPlugin is enabled with config ${JSON.stringify(mfConfig)}`);
81
+ return config;
82
+ });
83
+ api.onGenerateFiles(() => {
84
+ api.writeTmpFile({
85
+ content: `/* infer remote public */;
86
+ __webpack_public_path__ = document.currentScript.src + '/../';`,
87
+ path: mfSetupPathFileName
88
+ });
89
+ if (api.env === "development" && api.config.mfsu) {
90
+ return;
91
+ }
92
+ api.writeTmpFile({
93
+ content: `import('${(0, import_plugin_utils.winPath)((0, import_path.join)(api.paths.absTmpPath, "umi.ts"))}')`,
94
+ path: mfAsyncEntryFileName
95
+ });
96
+ });
97
+ function formatRemotes() {
98
+ const { remotes = [] } = api.config.mf;
99
+ const memo = {};
100
+ remotes.forEach((remote) => {
101
+ const aliasName = remote.aliasName || remote.name;
102
+ const r = formatRemote(remote);
103
+ if (memo[aliasName]) {
104
+ return api.logger.error(`${aliasName} already set as ${memo[aliasName]}, new value ${r} will be ignored`);
105
+ }
106
+ memo[aliasName] = r;
107
+ });
108
+ return memo;
109
+ }
110
+ function formatRemote(remote) {
111
+ if (remote.entry) {
112
+ return `${remote.name}@${remote.entry}`;
113
+ }
114
+ if (remote.entries && remote.keyResolver) {
115
+ const dynamicUrl = `promise new Promise(resolve => {
116
+ const entries = ${JSON.stringify(remote.entries)};
117
+ const key = ${remote.keyResolver};
118
+
119
+ const remoteUrlWithVersion = entries[key];
120
+ const script = document.createElement('script')
121
+ script.src = remoteUrlWithVersion
122
+ script.onload = () => {
123
+ // the injected script has loaded and is available on window
124
+ // we can now resolve this Promise
125
+ const proxy = {
126
+ get: (request) => window.${remote.name}.get(request),
127
+ init: (arg) => {
128
+ try {
129
+ return window.${remote.name}.init(arg)
130
+ } catch(e) {
131
+ console.log('remote container already initialized')
132
+ }
133
+ }
134
+ }
135
+ resolve(proxy)
136
+ }
137
+ // inject this script with the src set to the versioned remoteEntry.js
138
+ document.head.appendChild(script);
139
+ })
140
+ `;
141
+ return dynamicUrl;
142
+ } else {
143
+ api.logger.error("you should provider entry or entries and keyResolver");
144
+ throw Error("Wrong MF#remotes config");
145
+ }
146
+ }
147
+ async function constructExposes() {
148
+ const exposes = {};
149
+ const exposesPath = (0, import_path.join)(api.paths.absSrcPath, "exposes");
150
+ if (!(0, import_fs.existsSync)(exposesPath)) {
151
+ return exposes;
152
+ }
153
+ const dir = (0, import_fs.opendirSync)(exposesPath);
154
+ for await (const dirent of dir) {
155
+ if (dirent.isDirectory()) {
156
+ exposes["./" + dirent.name] = (0, import_plugin_utils.winPath)((0, import_path.join)(api.paths.absSrcPath, "exposes", dirent.name));
157
+ } else {
158
+ api.logger.warn(`${dirent.name} is not a directory, ignore in ModuleFederation expose`);
159
+ }
160
+ }
161
+ return exposes;
162
+ }
163
+ function mfName() {
164
+ const name = api.config.mf.name;
165
+ if (!name) {
166
+ api.logger.warn(`module federation name is not defined , "unNamedMF" will be used`);
167
+ }
168
+ return name || "unNamedMF";
169
+ }
170
+ function getShared() {
171
+ const { shared = {} } = api.config.mf;
172
+ return shared;
173
+ }
174
+ function changeUmiEntry(config) {
175
+ const { entry } = config;
176
+ const asyncEntryPath = (0, import_plugin_utils.winPath)((0, import_path.join)(api.paths.absTmpPath, "plugin-mf", mfAsyncEntryFileName));
177
+ if (entry.umi) {
178
+ if (typeof entry.umi === "string") {
179
+ entry.umi = asyncEntryPath;
180
+ } else if (Array.isArray(entry.umi)) {
181
+ const i = entry.umi.findIndex((f) => f.endsWith("umi.ts"));
182
+ if (i >= 0) {
183
+ entry.umi[i] = asyncEntryPath;
184
+ } else {
185
+ api.logger.info(`umi.ts not found in entry.umi ${JSON.stringify(entry.umi)}`);
186
+ }
187
+ }
188
+ } else {
189
+ api.logger.warn("umi entry not found");
190
+ }
191
+ }
192
+ function addMFEntry(config, mfName2, path) {
193
+ config.entry[mfName2] = path;
194
+ }
195
+ }
196
+ // Annotate the CommonJS export names for ESM import in node:
197
+ 0 && (module.exports = {});
package/dist/model.js CHANGED
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
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
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // model.ts
22
+ // src/model.ts
23
23
  var model_exports = {};
24
24
  __export(model_exports, {
25
25
  default: () => model_default
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
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
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // moment2dayjs.ts
22
+ // src/moment2dayjs.ts
23
23
  var moment2dayjs_exports = {};
24
24
  __export(moment2dayjs_exports, {
25
25
  default: () => moment2dayjs_default
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // constants.ts
19
+ // src/qiankun/constants.ts
20
20
  var constants_exports = {};
21
21
  __export(constants_exports, {
22
22
  MODEL_EXPORT_NAME: () => MODEL_EXPORT_NAME,
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
36
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
37
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
 
39
- // master.ts
39
+ // src/qiankun/master.ts
40
40
  var master_exports = {};
41
41
  __export(master_exports, {
42
42
  default: () => master_default,
@@ -36,7 +36,7 @@ var __copyProps = (to, from, except, desc) => {
36
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
37
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
38
 
39
- // slave.ts
39
+ // src/qiankun/slave.ts
40
40
  var slave_exports = {};
41
41
  __export(slave_exports, {
42
42
  default: () => slave_default
package/dist/qiankun.js CHANGED
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
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
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // qiankun.ts
22
+ // src/qiankun.ts
23
23
  var qiankun_exports = {};
24
24
  __export(qiankun_exports, {
25
25
  default: () => qiankun_default
package/dist/request.js CHANGED
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
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
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // request.ts
22
+ // src/request.ts
23
23
  var request_exports = {};
24
24
  __export(request_exports, {
25
25
  default: () => request_default
@@ -153,7 +153,7 @@ interface IErrorHandler {
153
153
  }
154
154
  type IRequestInterceptorAxios = (config: RequestOptions) => RequestOptions;
155
155
  type IRequestInterceptorUmiRequest = (url: string, config : RequestOptions) => { url: string, options: RequestOptions };
156
- type IRequestInterceptor = IRequestInterceptorAxios;
156
+ type IRequestInterceptor = IRequestInterceptorAxios | IRequestInterceptorUmiRequest;
157
157
  type IErrorInterceptor = (error: Error) => Promise<Error>;
158
158
  type IResponseInterceptor = <T = any>(response : AxiosResponse<T>) => AxiosResponse<T> ;
159
159
  type IRequestInterceptorTuple = [IRequestInterceptor , IErrorInterceptor] | [ IRequestInterceptor ] | IRequestInterceptor
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // tailwindcss.ts
19
+ // src/tailwindcss.ts
20
20
  var tailwindcss_exports = {};
21
21
  __export(tailwindcss_exports, {
22
22
  default: () => tailwindcss_default
package/dist/unocss.js CHANGED
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // unocss.ts
19
+ // src/unocss.ts
20
20
  var unocss_exports = {};
21
21
  __export(unocss_exports, {
22
22
  default: () => unocss_default
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
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
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // astUtils.ts
22
+ // src/utils/astUtils.ts
23
23
  var astUtils_exports = {};
24
24
  __export(astUtils_exports, {
25
25
  getIdentifierDeclaration: () => getIdentifierDeclaration
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // localeUtils.ts
19
+ // src/utils/localeUtils.ts
20
20
  var localeUtils_exports = {};
21
21
  __export(localeUtils_exports, {
22
22
  exactLocalePaths: () => exactLocalePaths,
@@ -19,7 +19,7 @@ var __copyProps = (to, from, except, desc) => {
19
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
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
21
21
 
22
- // modelUtils.ts
22
+ // src/utils/modelUtils.ts
23
23
  var modelUtils_exports = {};
24
24
  __export(modelUtils_exports, {
25
25
  Model: () => Model,
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // resolveProjectDep.ts
19
+ // src/utils/resolveProjectDep.ts
20
20
  var resolveProjectDep_exports = {};
21
21
  __export(resolveProjectDep_exports, {
22
22
  resolveProjectDep: () => resolveProjectDep
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
16
16
  };
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
 
19
- // withTmpPath.ts
19
+ // src/utils/withTmpPath.ts
20
20
  var withTmpPath_exports = {};
21
21
  __export(withTmpPath_exports, {
22
22
  withTmpPath: () => withTmpPath
@@ -262,6 +262,9 @@ http://j.mp/37Fkd5Q
262
262
  );
263
263
  firstWaring = false;
264
264
  }
265
+ if (!g_intl) {
266
+ setIntl(getLocale());
267
+ }
265
268
  return g_intl.formatMessage(descriptor, values);
266
269
  };
267
270
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/plugins",
3
- "version": "4.0.0-canary.20220727.1",
3
+ "version": "4.0.0-canary.20220729.1",
4
4
  "description": "@umijs/plugins",
5
5
  "homepage": "https://github.com/umijs/umi/tree/master/packages/plugins#readme",
6
6
  "bugs": "https://github.com/umijs/umi/issues",
@@ -25,7 +25,7 @@
25
25
  "@ahooksjs/use-request": "^2.0.0",
26
26
  "@ant-design/icons": "^4.7.0",
27
27
  "@ant-design/pro-layout": "^7.0.1-beta.28",
28
- "@umijs/bundler-utils": "4.0.0-canary.20220727.1",
28
+ "@umijs/bundler-utils": "4.0.0-canary.20220729.1",
29
29
  "antd-dayjs-webpack-plugin": "^1.0.6",
30
30
  "axios": "^0.27.2",
31
31
  "babel-plugin-import": "^1.13.5",
@@ -44,7 +44,7 @@
44
44
  "warning": "^4.0.3"
45
45
  },
46
46
  "devDependencies": {
47
- "umi": "4.0.0-canary.20220727.1"
47
+ "umi": "4.0.0-canary.20220729.1"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public"