@rsbuild/webpack 0.3.0 → 0.3.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.
@@ -1,3 +1,3 @@
1
- import { InitConfigsOptions } from './initConfigs';
1
+ import { type InitConfigsOptions } from './initConfigs';
2
2
  import { type BuildOptions } from '@rsbuild/shared';
3
3
  export declare const build: (initOptions: InitConfigsOptions, { mode, watch, compiler: customCompiler }?: BuildOptions) => Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import { type Rspack } from '@rsbuild/shared';
2
2
  import type { InternalContext } from '@rsbuild/core/provider';
3
3
  import type { WebpackConfig } from '../types';
4
- import { InitConfigsOptions } from './initConfigs';
4
+ import { type InitConfigsOptions } from './initConfigs';
5
5
  export declare function createCompiler({ context, webpackConfigs, }: {
6
6
  context: InternalContext;
7
7
  webpackConfigs: WebpackConfig[];
@@ -1,4 +1,4 @@
1
- import { InitConfigsOptions } from './initConfigs';
1
+ import { type InitConfigsOptions } from './initConfigs';
2
2
  import { type InspectConfigResult, type InspectConfigOptions } from '@rsbuild/shared';
3
3
  import type { WebpackConfig } from '../types';
4
4
  export declare function inspectConfig({ context, pluginStore, rsbuildOptions, bundlerConfigs, inspectOptions, }: InitConfigsOptions & {
@@ -1,4 +1,4 @@
1
- import { ModifyChainUtils, type RsbuildContext, type RsbuildPlugin, type NormalizedConfig, type BundlerChainRule } from '@rsbuild/shared';
1
+ import { type RsbuildContext, type RsbuildPlugin, type NormalizedConfig, type BundlerChainRule, type ModifyChainUtils } from '@rsbuild/shared';
2
2
  export declare function applyBaseCSSRule({ rule, config, context, utils: { target, isProd, isServer, CHAIN_ID, isWebWorker }, importLoaders, }: {
3
3
  rule: BundlerChainRule;
4
4
  config: NormalizedConfig;
@@ -1,4 +1,4 @@
1
- import { FileFilterUtil, type RsbuildPlugin } from '@rsbuild/shared';
1
+ import { type RsbuildPlugin, type FileFilterUtil } from '@rsbuild/shared';
2
2
  export type LessLoaderUtils = {
3
3
  addExcludes: FileFilterUtil;
4
4
  };
@@ -1,2 +1,2 @@
1
- import { type RsbuildPlugin } from '@rsbuild/shared';
1
+ import type { RsbuildPlugin } from '@rsbuild/shared';
2
2
  export declare const pluginServer: () => RsbuildPlugin;
@@ -5,6 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
9
  var __export = (target, all) => {
9
10
  for (var name in all)
10
11
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -26,6 +27,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
27
  mod
27
28
  ));
28
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var __publicField = (obj, key, value) => {
31
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
32
+ return value;
33
+ };
29
34
  var ProgressPlugin_exports = {};
30
35
  __export(ProgressPlugin_exports, {
31
36
  ProgressPlugin: () => ProgressPlugin
@@ -72,9 +77,10 @@ class ProgressPlugin extends import_webpack.default.ProgressPlugin {
72
77
  }
73
78
  }
74
79
  });
75
- this.name = "ProgressPlugin";
76
- this.hasCompileErrors = false;
77
- this.compileTime = null;
80
+ __publicField(this, "name", "ProgressPlugin");
81
+ __publicField(this, "id");
82
+ __publicField(this, "hasCompileErrors", false);
83
+ __publicField(this, "compileTime", null);
78
84
  this.id = id;
79
85
  }
80
86
  apply(compiler) {
@@ -5,6 +5,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
9
  var __export = (target, all) => {
9
10
  for (var name in all)
10
11
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -26,6 +27,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
27
  mod
27
28
  ));
28
29
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var __publicField = (obj, key, value) => {
31
+ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
32
+ return value;
33
+ };
29
34
  var bus_exports = {};
30
35
  __export(bus_exports, {
31
36
  bus: () => bus
@@ -39,8 +44,11 @@ var import_log = require("./log");
39
44
  var import_shared = require("@rsbuild/shared");
40
45
  class Bus {
41
46
  constructor() {
42
- this.states = [];
43
- this.destroyed = false;
47
+ __publicField(this, "states", []);
48
+ __publicField(this, "log");
49
+ __publicField(this, "restore");
50
+ __publicField(this, "prevOutput");
51
+ __publicField(this, "destroyed", false);
44
52
  this.prevOutput = "";
45
53
  this.log = (0, import_log.create)(process.stdout);
46
54
  console.Console = import_console.Console;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- import { Writable } from 'stream';
2
+ import type { Writable } from 'stream';
3
3
  export interface LogUpdate {
4
4
  clear: () => void;
5
5
  done: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/webpack",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "homepage": "https://rsbuild.dev",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,13 +35,13 @@
35
35
  "terser-webpack-plugin": "5.3.9",
36
36
  "tsconfig-paths-webpack-plugin": "4.1.0",
37
37
  "webpack": "^5.89.0",
38
- "@rsbuild/shared": "0.3.0",
39
- "@rsbuild/core": "0.3.0"
38
+ "@rsbuild/shared": "0.3.1",
39
+ "@rsbuild/core": "0.3.1"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@types/node": "16.x",
43
43
  "typescript": "^5.3.0",
44
- "@rsbuild/test-helper": "0.3.0"
44
+ "@scripts/test-helper": "1.0.0"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public",