@nocobase/build 1.5.0-alpha.5 → 1.5.0-beta.10

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/lib/build.js CHANGED
@@ -80,7 +80,8 @@ async function build(pkgs) {
80
80
  const appClient = packages.find((item) => item.location === import_constant.CORE_APP);
81
81
  if (appClient) {
82
82
  await runScript(["umi", "build"], import_constant.ROOT_PATH, {
83
- APP_ROOT: import_path.default.join(import_constant.CORE_APP, "client")
83
+ APP_ROOT: import_path.default.join(import_constant.CORE_APP, "client"),
84
+ ANALYZE: process.env.BUILD_ANALYZE === "true" ? "1" : void 0
84
85
  });
85
86
  }
86
87
  (0, import_utils.writeToCache)(BUILD_ERROR, {});
@@ -46,6 +46,7 @@ var import_constant = require("./constant");
46
46
  var import_utils = require("./utils");
47
47
  var import_buildPluginUtils = require("./utils/buildPluginUtils");
48
48
  var import_getDepsConfig = require("./utils/getDepsConfig");
49
+ var import_rspack_plugin = require("@rsdoctor/rspack-plugin");
49
50
  const validExts = [".ts", ".tsx", ".js", ".jsx", ".mjs"];
50
51
  const serverGlobalFiles = ["src/**", "!src/client/**", ...import_constant.globExcludeFiles];
51
52
  const clientGlobalFiles = ["src/**", "!src/server/**", ...import_constant.globExcludeFiles];
@@ -306,6 +307,7 @@ async function buildPluginClient(cwd, userConfig, sourcemap, log) {
306
307
  output: {
307
308
  path: outDir,
308
309
  filename: outputFileName,
310
+ chunkFilename: "[chunkhash].js",
309
311
  publicPath: `/static/plugins/${packageJson.name}/dist/client/`,
310
312
  clean: true,
311
313
  library: {
@@ -372,6 +374,18 @@ async function buildPluginClient(cwd, userConfig, sourcemap, log) {
372
374
  issuer: /\.[jt]sx?$/,
373
375
  use: ["@svgr/webpack"]
374
376
  },
377
+ {
378
+ test: /\.(?:js|mjs|cjs|ts|tsx)$/,
379
+ exclude: /node_modules/,
380
+ use: {
381
+ loader: "babel-loader",
382
+ options: {
383
+ targets: "defaults",
384
+ // presets: [['@babel/preset-env']],
385
+ plugins: ["react-imported-component/babel"]
386
+ }
387
+ }
388
+ },
375
389
  {
376
390
  test: /\.jsx$/,
377
391
  exclude: /[\\/]node_modules[\\/]/,
@@ -421,8 +435,15 @@ async function buildPluginClient(cwd, userConfig, sourcemap, log) {
421
435
  plugins: [
422
436
  new import_core.rspack.DefinePlugin({
423
437
  "process.env.NODE_ENV": JSON.stringify("production")
438
+ }),
439
+ process.env.BUILD_ANALYZE === "true" && new import_rspack_plugin.RsdoctorRspackPlugin({
440
+ // plugin options
441
+ // supports: {
442
+ // generateTileGraph: true,
443
+ // },
444
+ mode: "brief"
424
445
  })
425
- ],
446
+ ].filter(Boolean),
426
447
  node: {
427
448
  global: true
428
449
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/build",
3
- "version": "1.5.0-alpha.5",
3
+ "version": "1.5.0-beta.10",
4
4
  "description": "Library build tool based on rollup.",
5
5
  "main": "lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -9,29 +9,35 @@
9
9
  },
10
10
  "typings": "./index.d.ts",
11
11
  "dependencies": {
12
- "@babel/core": "7.25.2",
12
+ "@babel/core": "^7.26.0",
13
+ "@babel/plugin-syntax-dynamic-import": "^7.8.3",
13
14
  "@babel/plugin-transform-modules-amd": "7.24.7",
14
- "@babel/preset-env": "7.25.4",
15
+ "@babel/preset-env": "^7.26.0",
15
16
  "@hapi/topo": "^6.0.0",
16
17
  "@lerna/project": "4.0.0",
17
- "@rspack/core": "1.0.14",
18
+ "@rsbuild/plugin-babel": "^1.0.3",
19
+ "@rsdoctor/rspack-plugin": "^0.4.8",
20
+ "@rspack/core": "1.1.1",
18
21
  "@svgr/webpack": "^8.1.0",
19
22
  "@types/gulp": "^4.0.13",
20
23
  "@types/lerna__package": "5.1.0",
21
24
  "@types/lerna__project": "5.1.0",
22
25
  "@types/tar": "^6.1.5",
23
26
  "@vercel/ncc": "0.36.1",
27
+ "babel-loader": "^9.2.1",
28
+ "babel-plugin-syntax-dynamic-import": "^6.18.0",
24
29
  "chalk": "2.4.2",
25
30
  "css-loader": "^6.8.1",
26
31
  "esbuild-register": "^3.4.2",
27
32
  "fast-glob": "^3.3.1",
28
33
  "gulp": "4.0.2",
29
34
  "gulp-typescript": "6.0.0-alpha.1",
30
- "less": "^4.1.3",
31
- "less-loader": "11.1.0",
35
+ "less": "^4.2.0",
36
+ "less-loader": "^12.2.0",
32
37
  "postcss": "^8.4.29",
33
38
  "postcss-loader": "^7.3.3",
34
39
  "postcss-preset-env": "^9.1.2",
40
+ "react-imported-component": "^6.5.4",
35
41
  "style-loader": "^3.3.3",
36
42
  "tar": "^6.2.0",
37
43
  "tsup": "8.2.4",
@@ -45,5 +51,5 @@
45
51
  "scripts": {
46
52
  "build": "tsup"
47
53
  },
48
- "gitHead": "8d24e8d2c0f3f57ceaa271438fd93db2b4150011"
54
+ "gitHead": "379133b1104f8c609d7c5ac5bee23f9ba93934d5"
49
55
  }