@rsbuild/core 1.0.9 → 1.0.10
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/postcss-loader/index.js +8 -8
- package/dist/index.cjs +624 -535
- package/dist/index.js +614 -526
- package/dist-types/constants.d.ts +1 -0
- package/dist-types/server/helper.d.ts +3 -1
- package/dist-types/server/middlewares.d.ts +6 -0
- package/dist-types/types/config.d.ts +7 -1
- package/package.json +2 -2
|
@@ -18,6 +18,7 @@ export declare const DEFAULT_DATA_URL_SIZE = 4096;
|
|
|
18
18
|
export declare const DEFAULT_MOUNT_ID = "root";
|
|
19
19
|
export declare const DEFAULT_DEV_HOST = "0.0.0.0";
|
|
20
20
|
export declare const DEFAULT_ASSET_PREFIX = "/";
|
|
21
|
+
export declare const DEFAULT_BASE_URL = "/";
|
|
21
22
|
export declare const DEFAULT_WEB_BROWSERSLIST: string[];
|
|
22
23
|
export declare const DEFAULT_BROWSERSLIST: Record<string, string[]>;
|
|
23
24
|
export declare const HTML_REGEX: RegExp;
|
|
@@ -14,8 +14,10 @@ export type StartServerResult = {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
export declare const normalizeUrl: (url: string) => string;
|
|
17
|
+
export declare const joinUrlSegments: (s1: string, s2: string) => string;
|
|
18
|
+
export declare const stripBase: (path: string, base: string) => string;
|
|
17
19
|
export declare const getRoutes: (context: InternalContext) => Routes;
|
|
18
|
-
export declare const formatRoutes: (entry: RsbuildEntry,
|
|
20
|
+
export declare const formatRoutes: (entry: RsbuildEntry, base: string, distPathPrefix: string | undefined, outputStructure: OutputStructure | undefined) => Routes;
|
|
19
21
|
export declare function printServerURLs({ urls: originalUrls, port, routes, protocol, printUrls, }: {
|
|
20
22
|
urls: Array<{
|
|
21
23
|
url: string;
|
|
@@ -11,6 +11,12 @@ export declare const getHtmlCompletionMiddleware: (params: {
|
|
|
11
11
|
callback: Middleware;
|
|
12
12
|
outputFileSystem: Rspack.OutputFileSystem;
|
|
13
13
|
}) => Middleware;
|
|
14
|
+
/**
|
|
15
|
+
* handle `server.base`
|
|
16
|
+
*/
|
|
17
|
+
export declare const getBaseMiddleware: (params: {
|
|
18
|
+
base: string;
|
|
19
|
+
}) => Middleware;
|
|
14
20
|
/**
|
|
15
21
|
* support HTML fallback in some edge cases
|
|
16
22
|
*/
|
|
@@ -220,6 +220,12 @@ export type PublicDirOptions = {
|
|
|
220
220
|
};
|
|
221
221
|
export type PublicDir = false | PublicDirOptions | PublicDirOptions[];
|
|
222
222
|
export interface ServerConfig {
|
|
223
|
+
/**
|
|
224
|
+
* Configure the base path of the server.
|
|
225
|
+
*
|
|
226
|
+
* @default '/'
|
|
227
|
+
*/
|
|
228
|
+
base?: string;
|
|
223
229
|
/**
|
|
224
230
|
* Whether to enable gzip compression
|
|
225
231
|
*/
|
|
@@ -273,7 +279,7 @@ export interface ServerConfig {
|
|
|
273
279
|
*/
|
|
274
280
|
printUrls?: PrintUrls;
|
|
275
281
|
}
|
|
276
|
-
export type NormalizedServerConfig = ServerConfig & Required<Pick<ServerConfig, 'htmlFallback' | 'port' | 'host' | 'compress' | 'strictPort' | 'printUrls' | 'open'>>;
|
|
282
|
+
export type NormalizedServerConfig = ServerConfig & Required<Pick<ServerConfig, 'htmlFallback' | 'port' | 'host' | 'compress' | 'strictPort' | 'printUrls' | 'open' | 'base'>>;
|
|
277
283
|
export type SriAlgorithm = 'sha256' | 'sha384' | 'sha512';
|
|
278
284
|
export type SriOptions = {
|
|
279
285
|
algorithm?: SriAlgorithm;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsbuild/core",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "The Rspack-based build tool.",
|
|
5
5
|
"homepage": "https://rsbuild.dev",
|
|
6
6
|
"bugs": {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"sirv": "^2.0.4",
|
|
89
89
|
"style-loader": "3.3.4",
|
|
90
90
|
"tsc-alias": "^1.8.10",
|
|
91
|
-
"typescript": "^5.
|
|
91
|
+
"typescript": "^5.6.2",
|
|
92
92
|
"webpack": "^5.95.0",
|
|
93
93
|
"webpack-bundle-analyzer": "^4.10.2",
|
|
94
94
|
"webpack-merge": "6.0.1",
|