@4399ywkf/core 5.0.31 → 5.1.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/cli/index.js +8 -10
- package/dist/cli/index.js.map +1 -1
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +2 -2
- package/dist/config/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -10
- 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 +7 -8
- package/dist/rspack/index.js.map +1 -1
- package/dist/{schema-CMyZyL6E.d.ts → schema-C91lhskq.d.ts} +2 -0
- package/package.json +8 -10
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
|
@@ -377,8 +377,7 @@ var garfishPlugin = createPlugin((options = {}) => ({
|
|
|
377
377
|
if (!master) {
|
|
378
378
|
rspackConfig.output = {
|
|
379
379
|
...rspackConfig.output,
|
|
380
|
-
library: finalAppName,
|
|
381
|
-
libraryTarget: "umd",
|
|
380
|
+
library: { type: "umd", name: finalAppName },
|
|
382
381
|
globalObject: "window",
|
|
383
382
|
chunkLoadingGlobal: `garfish_${finalAppName}`
|
|
384
383
|
};
|
|
@@ -2125,6 +2124,7 @@ function defineConfig(config) {
|
|
|
2125
2124
|
var defaultConfig = {
|
|
2126
2125
|
appName: "app",
|
|
2127
2126
|
appCName: "\u5E94\u7528",
|
|
2127
|
+
strictMode: true,
|
|
2128
2128
|
dev: {
|
|
2129
2129
|
port: 3e3,
|
|
2130
2130
|
host: "localhost",
|
|
@@ -2474,7 +2474,7 @@ import { RsdoctorRspackPlugin } from "@rsdoctor/rspack-plugin";
|
|
|
2474
2474
|
|
|
2475
2475
|
// src/rspack/dev.ts
|
|
2476
2476
|
import { createRequire as createRequire2 } from "module";
|
|
2477
|
-
import
|
|
2477
|
+
import { ReactRefreshRspackPlugin } from "@rspack/plugin-react-refresh";
|
|
2478
2478
|
import { merge } from "webpack-merge";
|
|
2479
2479
|
|
|
2480
2480
|
// src/rspack/base.ts
|
|
@@ -2846,7 +2846,7 @@ function generateConventionalRoutes(options) {
|
|
|
2846
2846
|
|
|
2847
2847
|
// src/generator/templates/bootstrap.ts
|
|
2848
2848
|
function generateBootstrap(config, injections = {}) {
|
|
2849
|
-
const { appName, router } = config;
|
|
2849
|
+
const { appName, router, strictMode = true } = config;
|
|
2850
2850
|
const routerImport = router.conventional ? `import { createRouter } from "./routes";` : `import { createRouter } from "@/routes";`;
|
|
2851
2851
|
const imports = [
|
|
2852
2852
|
`import { bootstrap, type AppConfig } from "@4399ywkf/core/runtime";`,
|
|
@@ -2897,7 +2897,7 @@ export function createAppConfig(userConfig: Partial<AppConfig> = {}): AppConfig
|
|
|
2897
2897
|
router,
|
|
2898
2898
|
basename: effectiveBasename,
|
|
2899
2899
|
rootId: APP_NAME,
|
|
2900
|
-
strictMode:
|
|
2900
|
+
strictMode: ${strictMode},
|
|
2901
2901
|
antd: {
|
|
2902
2902
|
enabled: true,
|
|
2903
2903
|
},
|
|
@@ -3640,9 +3640,8 @@ function createBaseConfig(config, cwd, options = {}) {
|
|
|
3640
3640
|
].filter(Boolean),
|
|
3641
3641
|
output: {
|
|
3642
3642
|
assetModuleFilename: "images/[hash][ext]",
|
|
3643
|
-
library: microFrontend.enabled ? `${appCName}-[name]` : void 0,
|
|
3643
|
+
library: microFrontend.enabled ? { type: "umd", name: `${appCName}-[name]` } : void 0,
|
|
3644
3644
|
chunkFilename: "[name].[contenthash].js",
|
|
3645
|
-
libraryTarget: microFrontend.enabled ? "umd" : void 0,
|
|
3646
3645
|
globalObject: microFrontend.enabled ? "window" : void 0,
|
|
3647
3646
|
chunkLoadingGlobal: microFrontend.enabled ? `chunk_global_${appName}` : void 0,
|
|
3648
3647
|
publicPath: output.publicPath ?? "/",
|
|
@@ -3863,7 +3862,7 @@ function createDevConfig(config, cwd) {
|
|
|
3863
3862
|
clean: false
|
|
3864
3863
|
},
|
|
3865
3864
|
stats: "errors-only",
|
|
3866
|
-
plugins: [new
|
|
3865
|
+
plugins: [new ReactRefreshRspackPlugin()],
|
|
3867
3866
|
devServer: {
|
|
3868
3867
|
host: dev2.host,
|
|
3869
3868
|
port: dev2.port,
|
|
@@ -4244,7 +4243,6 @@ var DevPrinter = class {
|
|
|
4244
4243
|
*/
|
|
4245
4244
|
printBuildStart() {
|
|
4246
4245
|
this.startTime = Date.now();
|
|
4247
|
-
this.compileDone = false;
|
|
4248
4246
|
const label = chalk.gray("start");
|
|
4249
4247
|
console.log(` ${label} build started...`);
|
|
4250
4248
|
}
|
|
@@ -4339,7 +4337,7 @@ var DevPrinter = class {
|
|
|
4339
4337
|
}
|
|
4340
4338
|
};
|
|
4341
4339
|
function createProgressHandler(printer) {
|
|
4342
|
-
return (percent, message
|
|
4340
|
+
return (percent, message) => {
|
|
4343
4341
|
printer.updateProgress(percent, message);
|
|
4344
4342
|
};
|
|
4345
4343
|
}
|