@rsbuild/core 2.0.0-beta.2 → 2.0.0-beta.4

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.
@@ -771,34 +771,34 @@ export type FilenameConfig = {
771
771
  * The name of the JavaScript files.
772
772
  * @default
773
773
  * - dev: '[name].js'
774
- * - prod: '[name].[contenthash:8].js'
774
+ * - prod: '[name].[contenthash:10].js'
775
775
  */
776
776
  js?: Rspack.Filename;
777
777
  /**
778
778
  * The name of the CSS files.
779
779
  * @default
780
780
  * - dev: '[name].css'
781
- * - prod: '[name].[contenthash:8].css'
781
+ * - prod: '[name].[contenthash:10].css'
782
782
  */
783
783
  css?: Rspack.CssFilename;
784
784
  /**
785
785
  * The name of the SVG images.
786
- * @default '[name].[contenthash:8].svg'
786
+ * @default '[name].[contenthash:10].svg'
787
787
  */
788
788
  svg?: Rspack.AssetModuleFilename;
789
789
  /**
790
790
  * The name of the font files.
791
- * @default '[name].[contenthash:8][ext]'
791
+ * @default '[name].[contenthash:10][ext]'
792
792
  */
793
793
  font?: Rspack.AssetModuleFilename;
794
794
  /**
795
795
  * The name of non-SVG images.
796
- * @default '[name].[contenthash:8][ext]'
796
+ * @default '[name].[contenthash:10][ext]'
797
797
  */
798
798
  image?: Rspack.AssetModuleFilename;
799
799
  /**
800
800
  * The name of media assets, such as video.
801
- * @default '[name].[contenthash:8][ext]'
801
+ * @default '[name].[contenthash:10][ext]'
802
802
  */
803
803
  media?: Rspack.AssetModuleFilename;
804
804
  /**
@@ -808,7 +808,7 @@ export type FilenameConfig = {
808
808
  wasm?: Rspack.WebassemblyModuleFilename;
809
809
  /**
810
810
  * The name of other assets, except for above (image, svg, font, html, wasm...)
811
- * @default '[name].[contenthash:8][ext]'
811
+ * @default '[name].[contenthash:10][ext]'
812
812
  */
813
813
  assets?: Rspack.AssetModuleFilename;
814
814
  };
@@ -1576,6 +1576,13 @@ export type CliShortcut = {
1576
1576
  };
1577
1577
  export type WriteToDisk = boolean | ((filename: string) => boolean);
1578
1578
  export type BrowserLogsStackTrace = 'summary' | 'full' | 'none';
1579
+ export type LiveReload = boolean | {
1580
+ /**
1581
+ * Whether to trigger a full page reload when the HTML template changes.
1582
+ * @default true
1583
+ */
1584
+ html?: boolean;
1585
+ };
1579
1586
  export interface DevConfig {
1580
1587
  /**
1581
1588
  * Controls whether to forward browser runtime errors to the terminal. When `true`, the dev
@@ -1604,7 +1611,7 @@ export interface DevConfig {
1604
1611
  * Whether to reload the page when file changes are detected.
1605
1612
  * @default true
1606
1613
  */
1607
- liveReload?: boolean;
1614
+ liveReload?: LiveReload;
1608
1615
  /**
1609
1616
  * Set the URL prefix of static assets in development mode,
1610
1617
  * similar to the [output.publicPath](https://rspack.rs/config/output#outputpublicpath)
@@ -253,19 +253,11 @@ export type ModifyChainUtils = {
253
253
  */
254
254
  HtmlPlugin: typeof HtmlRspackPlugin;
255
255
  };
256
- interface PluginInstance {
257
- apply: (compiler: any) => void;
258
- [k: string]: any;
259
- }
260
256
  export type ModifyBundlerChainUtils = ModifyChainUtils & {
261
- bundler: {
262
- BannerPlugin: PluginInstance;
263
- DefinePlugin: PluginInstance;
264
- IgnorePlugin: PluginInstance;
265
- ProvidePlugin: PluginInstance;
266
- SourceMapDevToolPlugin: PluginInstance;
267
- HotModuleReplacementPlugin: PluginInstance;
268
- };
257
+ /**
258
+ * @deprecated Use `rspack` instead.
259
+ */
260
+ bundler: typeof rspack;
269
261
  };
270
262
  export type ModifyBundlerChainFn = (chain: RspackChain, utils: ModifyBundlerChainUtils) => MaybePromise<void>;
271
263
  export type CreateAsyncHook<Callback extends (...args: any[]) => any> = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "2.0.0-beta.2",
3
+ "version": "2.0.0-beta.4",
4
4
  "description": "The Rspack-based build tool.",
5
5
  "homepage": "https://rsbuild.rs",
6
6
  "bugs": {
@@ -36,9 +36,8 @@
36
36
  "types.d.ts"
37
37
  ],
38
38
  "dependencies": {
39
- "@rspack/core": "2.0.0-beta.0",
40
- "@swc/helpers": "^0.5.18",
41
- "jiti": "^2.6.1"
39
+ "@rspack/core": "2.0.0-beta.2",
40
+ "@swc/helpers": "^0.5.18"
42
41
  },
43
42
  "peerDependencies": {
44
43
  "core-js": ">= 3.0.0"
@@ -51,10 +50,10 @@
51
50
  "devDependencies": {
52
51
  "@jridgewell/remapping": "^2.3.5",
53
52
  "@jridgewell/trace-mapping": "^0.3.31",
54
- "@rslib/core": "0.19.4",
53
+ "@rslib/core": "0.19.5",
55
54
  "@types/connect": "3.4.38",
56
55
  "@types/cors": "^2.8.19",
57
- "@types/node": "^24.10.10",
56
+ "@types/node": "^24.10.12",
58
57
  "@types/on-finished": "2.3.5",
59
58
  "@types/range-parser": "^1.2.7",
60
59
  "@types/ws": "^8.18.1",
@@ -68,6 +67,7 @@
68
67
  "dotenv-expand": "12.0.3",
69
68
  "html-rspack-plugin": "6.1.7",
70
69
  "http-proxy-middleware": "^3.0.5",
70
+ "jiti": "^2.6.1",
71
71
  "launch-editor-middleware": "^2.12.0",
72
72
  "memfs": "^4.56.10",
73
73
  "mrmime": "^2.0.1",
@@ -88,7 +88,6 @@
88
88
  "supports-color": "^10.2.2",
89
89
  "tinyglobby": "0.2.14",
90
90
  "typescript": "^5.9.3",
91
- "webpack": "^5.104.1",
92
91
  "webpack-merge": "6.0.1",
93
92
  "ws": "^8.19.0"
94
93
  },