@4399ywkf/core 5.0.30 → 5.0.32
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/cli/index.js +8 -19
- package/dist/cli/index.js.map +1 -1
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +6 -17
- package/dist/config/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -19
- package/dist/index.js.map +1 -1
- package/dist/plugin/index.d.ts +2 -2
- package/dist/rspack/index.d.ts +1 -1
- package/dist/rspack/index.js +8 -19
- package/dist/rspack/index.js.map +1 -1
- package/dist/{schema-CMyZyL6E.d.ts → schema-C91lhskq.d.ts} +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { G as GeneratorContext, e as PluginHooks, Y as YwkfConfig, f as PluginConfig } from './schema-
|
|
2
|
-
export { A as AnalyticsPluginOptions, h as BiomePluginOptions, j as BrowserCheckPluginOptions, k as BrowserMinVersions, y as BuildHooks, C as CodeInjection, D as DevServerConfig, E as EnvConfig, m as GarfishPluginOptions, F as GeneratedFile, J as GeneratorHooks, H as HtmlConfig, I as I18nPluginOptions, M as MicroFrontendConfig, q as MockPluginOptions, b as OutputConfig, P as PerformanceConfig, K as PluginContext, s as ReactQueryPluginOptions, R as RouterConfig, L as RouterHooks, N as RuntimeHooks, S as StyleConfig, u as TailwindPluginOptions, v as ThemePluginOptions, T as ToolsConfig, Q as YwkfPlugin, Z as ZustandPluginOptions, g as analyticsPlugin, i as biomePlugin, l as browserCheckPlugin, d as defaultConfig, a as defineConfig, n as garfishPlugin, o as getDefaultBiomeConfig, p as i18nPlugin, r as mockPlugin, t as reactQueryPlugin, w as tailwindPlugin, x as themePlugin, z as zustandPlugin } from './schema-
|
|
1
|
+
import { G as GeneratorContext, e as PluginHooks, Y as YwkfConfig, f as PluginConfig } from './schema-C91lhskq.js';
|
|
2
|
+
export { A as AnalyticsPluginOptions, h as BiomePluginOptions, j as BrowserCheckPluginOptions, k as BrowserMinVersions, y as BuildHooks, C as CodeInjection, D as DevServerConfig, E as EnvConfig, m as GarfishPluginOptions, F as GeneratedFile, J as GeneratorHooks, H as HtmlConfig, I as I18nPluginOptions, M as MicroFrontendConfig, q as MockPluginOptions, b as OutputConfig, P as PerformanceConfig, K as PluginContext, s as ReactQueryPluginOptions, R as RouterConfig, L as RouterHooks, N as RuntimeHooks, S as StyleConfig, u as TailwindPluginOptions, v as ThemePluginOptions, T as ToolsConfig, Q as YwkfPlugin, Z as ZustandPluginOptions, g as analyticsPlugin, i as biomePlugin, l as browserCheckPlugin, d as defaultConfig, a as defineConfig, n as garfishPlugin, o as getDefaultBiomeConfig, p as i18nPlugin, r as mockPlugin, t as reactQueryPlugin, w as tailwindPlugin, x as themePlugin, z as zustandPlugin } from './schema-C91lhskq.js';
|
|
3
3
|
import { Compiler } from '@rspack/core';
|
|
4
4
|
export { PluginManager, createPlugin, definePlugin } from './plugin/index.js';
|
|
5
5
|
export { ConventionalRouteGenerator, ConventionalRoutePlugin, ConventionalRoutePluginOptions, GeneratorOptions, RouteConfig, generateConventionalRoutes } from './router/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1307,18 +1307,12 @@ var themePlugin = createPlugin((options = {}) => ({
|
|
|
1307
1307
|
order: 10,
|
|
1308
1308
|
}`;
|
|
1309
1309
|
if (code.includes("providers: []")) {
|
|
1310
|
-
code = code.replace(
|
|
1311
|
-
"providers: []",
|
|
1312
|
-
`providers: [
|
|
1310
|
+
code = code.replace("providers: []", `providers: [
|
|
1313
1311
|
${providerEntry},
|
|
1314
|
-
]`
|
|
1315
|
-
);
|
|
1312
|
+
]`);
|
|
1316
1313
|
} else if (code.includes("providers: [")) {
|
|
1317
|
-
code = code.replace(
|
|
1318
|
-
|
|
1319
|
-
`providers: [
|
|
1320
|
-
${providerEntry},`
|
|
1321
|
-
);
|
|
1314
|
+
code = code.replace("providers: [", `providers: [
|
|
1315
|
+
${providerEntry},`);
|
|
1322
1316
|
}
|
|
1323
1317
|
if (!code.includes("import React")) {
|
|
1324
1318
|
code = code.replace(
|
|
@@ -1351,9 +1345,7 @@ function generateThemeProvider(opts) {
|
|
|
1351
1345
|
sections.push(`// \u6B64\u6587\u4EF6\u7531 @4399ywkf/plugin-theme v3 \u81EA\u52A8\u751F\u6210\uFF0C\u8BF7\u52FF\u624B\u52A8\u4FEE\u6539`);
|
|
1352
1346
|
sections.push(buildImports({ globalReset, cssVar, scopePopupContainer, locale }));
|
|
1353
1347
|
sections.push(TYPES_CODE);
|
|
1354
|
-
sections.push(
|
|
1355
|
-
buildStoreCode({ defaultAppearance, primaryColor, neutralColor, locale })
|
|
1356
|
-
);
|
|
1348
|
+
sections.push(buildStoreCode({ defaultAppearance, primaryColor, neutralColor, locale }));
|
|
1357
1349
|
sections.push(HOOKS_CODE);
|
|
1358
1350
|
if (globalReset) sections.push(GLOBAL_RESET_CODE);
|
|
1359
1351
|
if (cssVar) sections.push(buildCssVarSyncCode());
|
|
@@ -1550,10 +1542,6 @@ const GlobalReset = createGlobalStyle(({ theme }) => css\`
|
|
|
1550
1542
|
code {
|
|
1551
1543
|
font-family: \${theme.fontFamilyCode} !important;
|
|
1552
1544
|
}
|
|
1553
|
-
|
|
1554
|
-
::selection {
|
|
1555
|
-
-webkit-text-fill-color: unset !important;
|
|
1556
|
-
}
|
|
1557
1545
|
\`);`;
|
|
1558
1546
|
function buildCssVarSyncCode() {
|
|
1559
1547
|
return `
|
|
@@ -2137,6 +2125,7 @@ function defineConfig(config) {
|
|
|
2137
2125
|
var defaultConfig = {
|
|
2138
2126
|
appName: "app",
|
|
2139
2127
|
appCName: "\u5E94\u7528",
|
|
2128
|
+
strictMode: true,
|
|
2140
2129
|
dev: {
|
|
2141
2130
|
port: 3e3,
|
|
2142
2131
|
host: "localhost",
|
|
@@ -2858,7 +2847,7 @@ function generateConventionalRoutes(options) {
|
|
|
2858
2847
|
|
|
2859
2848
|
// src/generator/templates/bootstrap.ts
|
|
2860
2849
|
function generateBootstrap(config, injections = {}) {
|
|
2861
|
-
const { appName, router } = config;
|
|
2850
|
+
const { appName, router, strictMode = true } = config;
|
|
2862
2851
|
const routerImport = router.conventional ? `import { createRouter } from "./routes";` : `import { createRouter } from "@/routes";`;
|
|
2863
2852
|
const imports = [
|
|
2864
2853
|
`import { bootstrap, type AppConfig } from "@4399ywkf/core/runtime";`,
|
|
@@ -2909,7 +2898,7 @@ export function createAppConfig(userConfig: Partial<AppConfig> = {}): AppConfig
|
|
|
2909
2898
|
router,
|
|
2910
2899
|
basename: effectiveBasename,
|
|
2911
2900
|
rootId: APP_NAME,
|
|
2912
|
-
strictMode:
|
|
2901
|
+
strictMode: ${strictMode},
|
|
2913
2902
|
antd: {
|
|
2914
2903
|
enabled: true,
|
|
2915
2904
|
},
|