@nocobase/build 1.5.0-alpha.5 → 1.6.0-alpha.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/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];
@@ -372,6 +373,18 @@ async function buildPluginClient(cwd, userConfig, sourcemap, log) {
372
373
  issuer: /\.[jt]sx?$/,
373
374
  use: ["@svgr/webpack"]
374
375
  },
376
+ {
377
+ test: /\.(?:js|mjs|cjs|ts|tsx)$/,
378
+ exclude: /node_modules/,
379
+ use: {
380
+ loader: "babel-loader",
381
+ options: {
382
+ targets: "defaults",
383
+ // presets: [['@babel/preset-env']],
384
+ plugins: ["react-imported-component/babel"]
385
+ }
386
+ }
387
+ },
375
388
  {
376
389
  test: /\.jsx$/,
377
390
  exclude: /[\\/]node_modules[\\/]/,
@@ -421,8 +434,15 @@ async function buildPluginClient(cwd, userConfig, sourcemap, log) {
421
434
  plugins: [
422
435
  new import_core.rspack.DefinePlugin({
423
436
  "process.env.NODE_ENV": JSON.stringify("production")
437
+ }),
438
+ process.env.BUILD_ANALYZE === "true" && new import_rspack_plugin.RsdoctorRspackPlugin({
439
+ // plugin options
440
+ // supports: {
441
+ // generateTileGraph: true,
442
+ // },
443
+ mode: "brief"
424
444
  })
425
- ],
445
+ ].filter(Boolean),
426
446
  node: {
427
447
  global: true
428
448
  },
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.6.0-alpha.1",
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": "a4c91015e34ec0c9a427451b5fbdfb5fedc4f3d7"
49
55
  }