@umijs/plugins 4.0.0-canary.20220316.1 → 4.0.0-canary.20220317.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.
Files changed (2) hide show
  1. package/dist/locale.js +7 -8
  2. package/package.json +3 -3
package/dist/locale.js CHANGED
@@ -28,15 +28,15 @@ exports.default = (api) => {
28
28
  catch (e) {
29
29
  api.logger.warn('antd is not installed. <SelecLang /> unavailable');
30
30
  }
31
+ const defaultConfig = {
32
+ baseNavigator: true,
33
+ useLocalStorage: true,
34
+ baseSeparator: '-',
35
+ antd: hasAntd,
36
+ };
31
37
  api.describe({
32
38
  key: 'locale',
33
39
  config: {
34
- default: {
35
- baseNavigator: true,
36
- useLocalStorage: true,
37
- baseSeparator: '-',
38
- antd: hasAntd,
39
- },
40
40
  schema(joi) {
41
41
  return joi.object({
42
42
  default: joi.string(),
@@ -89,8 +89,7 @@ exports.default = (api) => {
89
89
  const resolveKey = api.config.moment2dayjs ? 'dayjs' : 'moment';
90
90
  const momentPkgPath = (0, plugin_utils_1.winPath)((0, path_1.dirname)(require.resolve(`${resolveKey}/package.json`)));
91
91
  const EventEmitterPkg = (0, plugin_utils_1.winPath)((0, path_1.dirname)(require.resolve('event-emitter/package')));
92
- const { baseSeparator, baseNavigator, antd, title, useLocalStorage } = api
93
- .config.locale;
92
+ const { baseSeparator, baseNavigator, antd, title, useLocalStorage } = Object.assign(Object.assign({}, defaultConfig), api.config.locale);
94
93
  const defaultLocale = ((_e = api.config.locale) === null || _e === void 0 ? void 0 : _e.default) || `zh${baseSeparator}CN`;
95
94
  const localeList = yield getList(resolveKey);
96
95
  const momentLocales = localeList
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umijs/plugins",
3
- "version": "4.0.0-canary.20220316.1",
3
+ "version": "4.0.0-canary.20220317.1",
4
4
  "description": "@umijs/plugins",
5
5
  "homepage": "https://github.com/umijs/umi-next/tree/master/packages/plugins#readme",
6
6
  "bugs": "https://github.com/umijs/umi-next/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.3",
28
- "@umijs/bundler-utils": "4.0.0-canary.20220316.1",
28
+ "@umijs/bundler-utils": "4.0.0-canary.20220317.1",
29
29
  "antd-dayjs-webpack-plugin": "^1.0.6",
30
30
  "axios": "^0.26.1",
31
31
  "babel-plugin-import": "^1.13.3",
@@ -44,7 +44,7 @@
44
44
  "warning": "^4.0.3"
45
45
  },
46
46
  "devDependencies": {
47
- "umi": "4.0.0-canary.20220316.1"
47
+ "umi": "4.0.0-canary.20220317.1"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public"