@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/cli/index.js
CHANGED
|
@@ -380,8 +380,7 @@ var garfishPlugin = createPlugin((options = {}) => ({
|
|
|
380
380
|
if (!master) {
|
|
381
381
|
rspackConfig.output = {
|
|
382
382
|
...rspackConfig.output,
|
|
383
|
-
library: finalAppName,
|
|
384
|
-
libraryTarget: "umd",
|
|
383
|
+
library: { type: "umd", name: finalAppName },
|
|
385
384
|
globalObject: "window",
|
|
386
385
|
chunkLoadingGlobal: `garfish_${finalAppName}`
|
|
387
386
|
};
|
|
@@ -2125,6 +2124,7 @@ function collectPluginNames(plugins) {
|
|
|
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
|
|
@@ -2843,7 +2843,7 @@ export default routes;
|
|
|
2843
2843
|
|
|
2844
2844
|
// src/generator/templates/bootstrap.ts
|
|
2845
2845
|
function generateBootstrap(config, injections = {}) {
|
|
2846
|
-
const { appName, router } = config;
|
|
2846
|
+
const { appName, router, strictMode = true } = config;
|
|
2847
2847
|
const routerImport = router.conventional ? `import { createRouter } from "./routes";` : `import { createRouter } from "@/routes";`;
|
|
2848
2848
|
const imports = [
|
|
2849
2849
|
`import { bootstrap, type AppConfig } from "@4399ywkf/core/runtime";`,
|
|
@@ -2894,7 +2894,7 @@ export function createAppConfig(userConfig: Partial<AppConfig> = {}): AppConfig
|
|
|
2894
2894
|
router,
|
|
2895
2895
|
basename: effectiveBasename,
|
|
2896
2896
|
rootId: APP_NAME,
|
|
2897
|
-
strictMode:
|
|
2897
|
+
strictMode: ${strictMode},
|
|
2898
2898
|
antd: {
|
|
2899
2899
|
enabled: true,
|
|
2900
2900
|
},
|
|
@@ -3637,9 +3637,8 @@ function createBaseConfig(config, cwd, options = {}) {
|
|
|
3637
3637
|
].filter(Boolean),
|
|
3638
3638
|
output: {
|
|
3639
3639
|
assetModuleFilename: "images/[hash][ext]",
|
|
3640
|
-
library: microFrontend.enabled ? `${appCName}-[name]` : void 0,
|
|
3640
|
+
library: microFrontend.enabled ? { type: "umd", name: `${appCName}-[name]` } : void 0,
|
|
3641
3641
|
chunkFilename: "[name].[contenthash].js",
|
|
3642
|
-
libraryTarget: microFrontend.enabled ? "umd" : void 0,
|
|
3643
3642
|
globalObject: microFrontend.enabled ? "window" : void 0,
|
|
3644
3643
|
chunkLoadingGlobal: microFrontend.enabled ? `chunk_global_${appName}` : void 0,
|
|
3645
3644
|
publicPath: output.publicPath ?? "/",
|
|
@@ -3860,7 +3859,7 @@ function createDevConfig(config, cwd) {
|
|
|
3860
3859
|
clean: false
|
|
3861
3860
|
},
|
|
3862
3861
|
stats: "errors-only",
|
|
3863
|
-
plugins: [new
|
|
3862
|
+
plugins: [new ReactRefreshRspackPlugin()],
|
|
3864
3863
|
devServer: {
|
|
3865
3864
|
host: dev2.host,
|
|
3866
3865
|
port: dev2.port,
|
|
@@ -4241,7 +4240,6 @@ var DevPrinter = class {
|
|
|
4241
4240
|
*/
|
|
4242
4241
|
printBuildStart() {
|
|
4243
4242
|
this.startTime = Date.now();
|
|
4244
|
-
this.compileDone = false;
|
|
4245
4243
|
const label = chalk.gray("start");
|
|
4246
4244
|
console.log(` ${label} build started...`);
|
|
4247
4245
|
}
|
|
@@ -4336,7 +4334,7 @@ var DevPrinter = class {
|
|
|
4336
4334
|
}
|
|
4337
4335
|
};
|
|
4338
4336
|
function createProgressHandler(printer) {
|
|
4339
|
-
return (percent, message
|
|
4337
|
+
return (percent, message) => {
|
|
4340
4338
|
printer.updateProgress(percent, message);
|
|
4341
4339
|
};
|
|
4342
4340
|
}
|