dumi 2.1.16 → 2.1.17
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.
|
@@ -28,7 +28,10 @@ var NO_PRERENDER_ROUTES = [
|
|
|
28
28
|
"demo-render"
|
|
29
29
|
];
|
|
30
30
|
var exportStatic_default = (api) => {
|
|
31
|
-
api.describe({
|
|
31
|
+
api.describe({
|
|
32
|
+
key: "dumi:exportStatic",
|
|
33
|
+
enableBy: ({ env }) => env === "production" && api.isPluginEnable("exportStatic")
|
|
34
|
+
});
|
|
32
35
|
api.modifyRoutes({
|
|
33
36
|
stage: Infinity,
|
|
34
37
|
fn(memo) {
|
package/dist/features/locales.js
CHANGED
|
@@ -50,6 +50,15 @@ var locales_default = (api) => {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
});
|
|
53
|
+
api.onCheck(() => {
|
|
54
|
+
if (api.config.locales) {
|
|
55
|
+
api.config.locales.slice(1).forEach((locale) => {
|
|
56
|
+
if ("base" in locale && locale.base === "/") {
|
|
57
|
+
assert(false, `Only the first locale item is allowed to set base: '/', you can move ${locale.id} to the front as default locale. See more: See https://d.umijs.org/config#locales`);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
});
|
|
53
62
|
api.register({
|
|
54
63
|
key: "modifyConfig",
|
|
55
64
|
stage: Infinity,
|