@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/plugin/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Q as YwkfPlugin, e as PluginHooks, Y as YwkfConfig, f as PluginConfig, U as RouteItem } from '../schema-
|
|
2
|
-
export { y as BuildHooks, C as CodeInjection, V as DefinePlugin, F as GeneratedFile, G as GeneratorContext, J as GeneratorHooks, W as PluginAPI, K as PluginContext, X as PluginLogger, L as RouterHooks, N as RuntimeHooks } from '../schema-
|
|
1
|
+
import { Q as YwkfPlugin, e as PluginHooks, Y as YwkfConfig, f as PluginConfig, U as RouteItem } from '../schema-C91lhskq.js';
|
|
2
|
+
export { y as BuildHooks, C as CodeInjection, V as DefinePlugin, F as GeneratedFile, G as GeneratorContext, J as GeneratorHooks, W as PluginAPI, K as PluginContext, X as PluginLogger, L as RouterHooks, N as RuntimeHooks } from '../schema-C91lhskq.js';
|
|
3
3
|
import { Configuration } from '@rspack/core';
|
|
4
4
|
import { a as AppConfig, P as ProviderConfig } from '../types-BYqzyGAY.js';
|
|
5
5
|
import 'react';
|
package/dist/rspack/index.d.ts
CHANGED
package/dist/rspack/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { RsdoctorRspackPlugin } from "@rsdoctor/rspack-plugin";
|
|
|
3
3
|
|
|
4
4
|
// src/rspack/dev.ts
|
|
5
5
|
import { createRequire as createRequire2 } from "module";
|
|
6
|
-
import
|
|
6
|
+
import { ReactRefreshRspackPlugin } from "@rspack/plugin-react-refresh";
|
|
7
7
|
import { merge } from "webpack-merge";
|
|
8
8
|
|
|
9
9
|
// src/config/loader.ts
|
|
@@ -375,8 +375,7 @@ var garfishPlugin = createPlugin((options = {}) => ({
|
|
|
375
375
|
if (!master) {
|
|
376
376
|
rspackConfig.output = {
|
|
377
377
|
...rspackConfig.output,
|
|
378
|
-
library: finalAppName,
|
|
379
|
-
libraryTarget: "umd",
|
|
378
|
+
library: { type: "umd", name: finalAppName },
|
|
380
379
|
globalObject: "window",
|
|
381
380
|
chunkLoadingGlobal: `garfish_${finalAppName}`
|
|
382
381
|
};
|
|
@@ -2061,6 +2060,7 @@ var ALL_SHORTHAND_KEYS = /* @__PURE__ */ new Set([
|
|
|
2061
2060
|
var defaultConfig = {
|
|
2062
2061
|
appName: "app",
|
|
2063
2062
|
appCName: "\u5E94\u7528",
|
|
2063
|
+
strictMode: true,
|
|
2064
2064
|
dev: {
|
|
2065
2065
|
port: 3e3,
|
|
2066
2066
|
host: "localhost",
|
|
@@ -2525,7 +2525,7 @@ export default routes;
|
|
|
2525
2525
|
|
|
2526
2526
|
// src/generator/templates/bootstrap.ts
|
|
2527
2527
|
function generateBootstrap(config, injections = {}) {
|
|
2528
|
-
const { appName, router } = config;
|
|
2528
|
+
const { appName, router, strictMode = true } = config;
|
|
2529
2529
|
const routerImport = router.conventional ? `import { createRouter } from "./routes";` : `import { createRouter } from "@/routes";`;
|
|
2530
2530
|
const imports = [
|
|
2531
2531
|
`import { bootstrap, type AppConfig } from "@4399ywkf/core/runtime";`,
|
|
@@ -2576,7 +2576,7 @@ export function createAppConfig(userConfig: Partial<AppConfig> = {}): AppConfig
|
|
|
2576
2576
|
router,
|
|
2577
2577
|
basename: effectiveBasename,
|
|
2578
2578
|
rootId: APP_NAME,
|
|
2579
|
-
strictMode:
|
|
2579
|
+
strictMode: ${strictMode},
|
|
2580
2580
|
antd: {
|
|
2581
2581
|
enabled: true,
|
|
2582
2582
|
},
|
|
@@ -3319,9 +3319,8 @@ function createBaseConfig(config, cwd, options = {}) {
|
|
|
3319
3319
|
].filter(Boolean),
|
|
3320
3320
|
output: {
|
|
3321
3321
|
assetModuleFilename: "images/[hash][ext]",
|
|
3322
|
-
library: microFrontend.enabled ? `${appCName}-[name]` : void 0,
|
|
3322
|
+
library: microFrontend.enabled ? { type: "umd", name: `${appCName}-[name]` } : void 0,
|
|
3323
3323
|
chunkFilename: "[name].[contenthash].js",
|
|
3324
|
-
libraryTarget: microFrontend.enabled ? "umd" : void 0,
|
|
3325
3324
|
globalObject: microFrontend.enabled ? "window" : void 0,
|
|
3326
3325
|
chunkLoadingGlobal: microFrontend.enabled ? `chunk_global_${appName}` : void 0,
|
|
3327
3326
|
publicPath: output.publicPath ?? "/",
|
|
@@ -3542,7 +3541,7 @@ function createDevConfig(config, cwd) {
|
|
|
3542
3541
|
clean: false
|
|
3543
3542
|
},
|
|
3544
3543
|
stats: "errors-only",
|
|
3545
|
-
plugins: [new
|
|
3544
|
+
plugins: [new ReactRefreshRspackPlugin()],
|
|
3546
3545
|
devServer: {
|
|
3547
3546
|
host: dev.host,
|
|
3548
3547
|
port: dev.port,
|