@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.
- package/compiled/css-loader/index.js +2 -2
- package/compiled/html-rspack-plugin/index.js +16 -16
- package/compiled/jiti/LICENSE +21 -0
- package/compiled/jiti/README.md +243 -0
- package/compiled/jiti/dist/babel.cjs +46699 -0
- package/compiled/jiti/dist/jiti.cjs +4842 -0
- package/compiled/jiti/lib/jiti-cli.mjs +19 -0
- package/compiled/jiti/lib/jiti-hooks.mjs +89 -0
- package/compiled/jiti/lib/jiti-native.mjs +76 -0
- package/compiled/jiti/lib/jiti-register.d.mts +1 -0
- package/compiled/jiti/lib/jiti-register.mjs +2 -0
- package/compiled/jiti/lib/jiti.cjs +24 -0
- package/compiled/jiti/lib/jiti.d.cts +8 -0
- package/compiled/jiti/lib/jiti.d.mts +8 -0
- package/compiled/jiti/lib/jiti.mjs +23 -0
- package/compiled/jiti/lib/types.d.ts +363 -0
- package/compiled/jiti/package.json +133 -0
- package/compiled/postcss-loader/index.js +9 -9
- package/compiled/style-loader/index.js +10 -10
- package/dist/131.js +45 -46
- package/dist/manifest-plugin.js +5 -5
- package/dist/open.js +5 -3
- package/dist-types/server/assets-middleware/index.d.ts +3 -2
- package/dist-types/server/cliShortcuts.d.ts +1 -0
- package/dist-types/types/config.d.ts +15 -8
- package/dist-types/types/hooks.d.ts +4 -12
- package/package.json +6 -7
|
@@ -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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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?:
|
|
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
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
},
|