@winner-fed/bundler-rsbuild 0.9.5 → 0.9.6-alpha.0

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/build.js CHANGED
@@ -53,7 +53,7 @@ async function build(opts) {
53
53
  var _a;
54
54
  (0, import_assert.default)(opts, "opts should be supplied");
55
55
  (0, import_checkConfig.checkConfig)(opts);
56
- const { cwd, onBuildComplete } = opts;
56
+ const { cwd, onBuildComplete, config } = opts;
57
57
  const rsbuildConfig = await configModule.getRsbuildConfig({
58
58
  userConfig: opts.config,
59
59
  env: import_types.Env.production,
@@ -76,6 +76,15 @@ async function build(opts) {
76
76
  err.stack = null;
77
77
  throw err;
78
78
  }
79
+ const { inspectConfig } = config;
80
+ if (inspectConfig) {
81
+ await rsbuild.inspectConfig({
82
+ env: import_types.Env.production,
83
+ verbose: inspectConfig.verbose || false,
84
+ outputPath: inspectConfig.outputPath,
85
+ writeToDisk: true
86
+ });
87
+ }
79
88
  const stats = {
80
89
  compilation: {
81
90
  ...statsJson,
@@ -27,6 +27,6 @@ export declare function getOutConfig(opts: IOpts): {
27
27
  sourceMap: {
28
28
  js: any;
29
29
  };
30
- legalComments: "none";
30
+ legalComments: "inline";
31
31
  };
32
32
  export {};
@@ -46,7 +46,7 @@ function getOutConfig(opts) {
46
46
  } = userConfig;
47
47
  const disableCompress = process.env.COMPRESS === "none";
48
48
  const minify = !(isDev || disableCompress);
49
- const legalComments = "none";
49
+ const legalComments = "inline";
50
50
  userConfig.targets || (userConfig.targets = import_constants.DEFAULT_BROWSER_TARGETS);
51
51
  if (typeof externals === "string") {
52
52
  throw new Error("externals string is not supported");
@@ -36,6 +36,7 @@ var import_core = require("@rsbuild/core");
36
36
  var import_bundler_utils = require("@winner-fed/bundler-utils");
37
37
  var import_express = __toESM(require("@winner-fed/bundler-utils/compiled/express"));
38
38
  var import_utils = require("@winner-fed/utils");
39
+ var import_types = require("../types");
39
40
  async function createServer(opts) {
40
41
  const { userConfig, rsbuildConfig } = opts;
41
42
  const rsbuild = await (0, import_core.createRsbuild)({
@@ -64,6 +65,15 @@ async function createServer(opts) {
64
65
  console.log(banner.after);
65
66
  });
66
67
  httpServer.on("upgrade", rsbuildServer.onHTTPUpgrade);
68
+ const { inspectConfig } = userConfig;
69
+ if (inspectConfig) {
70
+ await rsbuild.inspectConfig({
71
+ env: import_types.Env.development,
72
+ verbose: inspectConfig.verbose || false,
73
+ outputPath: inspectConfig.outputPath,
74
+ writeToDisk: true
75
+ });
76
+ }
67
77
  rsbuild.onDevCompileDone(({ isFirstCompile, stats }) => {
68
78
  var _a;
69
79
  if (opts.onDevCompileDone) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@winner-fed/bundler-rsbuild",
3
- "version": "0.9.5",
3
+ "version": "0.9.6-alpha.0",
4
4
  "description": "@winner-fed/bundler-rsbuild",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -15,8 +15,8 @@
15
15
  "@rsbuild/plugin-node-polyfill": "1.0.3",
16
16
  "@rsbuild/plugin-sass": "1.0.1-beta.4",
17
17
  "@rsbuild/plugin-type-check": "1.0.1-beta.4",
18
- "@winner-fed/utils": "0.9.5",
19
- "@winner-fed/bundler-utils": "0.9.5"
18
+ "@winner-fed/bundler-utils": "0.9.6-alpha.0",
19
+ "@winner-fed/utils": "0.9.6-alpha.0"
20
20
  },
21
21
  "publishConfig": {
22
22
  "access": "public"