@lynx-js/rspeedy 0.8.2 → 0.8.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/CHANGELOG.md +44 -0
- package/README.md +2 -2
- package/lib/config/mergeRspeedyConfig.d.ts +36 -0
- package/lib/config/mergeRspeedyConfig.js +42 -0
- package/lib/config/rsbuild/index.js +1 -0
- package/lib/config/server/index.d.ts +22 -0
- package/lib/config/validate.js +1685 -1456
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/plugins/dev.plugin.d.ts +1 -1
- package/lib/plugins/dev.plugin.js +33 -26
- package/package.json +15 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,49 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
+
## 0.8.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Bump Rsbuild v1.2.19 with Rspack v1.2.8 ([#168](https://github.com/lynx-family/lynx-stack/pull/168))
|
|
8
|
+
|
|
9
|
+
- Add `mergeRspeedyConfig` function for merging multiple Rspeedy configuration object. ([#169](https://github.com/lynx-family/lynx-stack/pull/169))
|
|
10
|
+
|
|
11
|
+
- Bump Rsdoctor v1.0.0-rc.0 ([#186](https://github.com/lynx-family/lynx-stack/pull/186))
|
|
12
|
+
|
|
13
|
+
- Support configure the base path of the server. ([#196](https://github.com/lynx-family/lynx-stack/pull/196))
|
|
14
|
+
|
|
15
|
+
By default, the base path of the server is `/`, and users can access lynx bundle through `http://<host>:<port>/main.lynx.bundle`
|
|
16
|
+
If you want to access lynx bundle through `http://<host>:<port>/foo/main.lynx.bundle`, you can change `server.base` to `/foo`
|
|
17
|
+
|
|
18
|
+
example:
|
|
19
|
+
|
|
20
|
+
```js
|
|
21
|
+
import { defineConfig } from '@lynx-js/rspeedy'
|
|
22
|
+
export default defineConfig({
|
|
23
|
+
server: {
|
|
24
|
+
base: '/dist',
|
|
25
|
+
},
|
|
26
|
+
})
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
30
|
+
- @lynx-js/webpack-dev-transport@0.1.2
|
|
31
|
+
|
|
32
|
+
## 0.8.3
|
|
33
|
+
|
|
34
|
+
### Patch Changes
|
|
35
|
+
|
|
36
|
+
- Support NPM provenance. ([#30](https://github.com/lynx-family/lynx-stack/pull/30))
|
|
37
|
+
|
|
38
|
+
- Fix error "'wmic' is not recognized as an internal or external command" ([#91](https://github.com/lynx-family/lynx-stack/pull/91))
|
|
39
|
+
|
|
40
|
+
- Bump Rsbuild v1.2.15 with Rspack v1.2.7. ([#44](https://github.com/lynx-family/lynx-stack/pull/44))
|
|
41
|
+
|
|
42
|
+
- Updated dependencies [[`c617453`](https://github.com/lynx-family/lynx-stack/commit/c617453aea967aba702967deb2916b5c883f03bb)]:
|
|
43
|
+
- @lynx-js/chunk-loading-webpack-plugin@0.1.7
|
|
44
|
+
- @lynx-js/webpack-dev-transport@0.1.1
|
|
45
|
+
- @lynx-js/websocket@0.0.4
|
|
46
|
+
|
|
3
47
|
## 0.8.2
|
|
4
48
|
|
|
5
49
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="https://lynxjs.org/rspeedy" target="blank"><img src="https://
|
|
2
|
+
<a href="https://lynxjs.org/rspeedy" target="blank"><img src="https://lf-lynx.tiktok-cdns.com/obj/lynx-artifacts-oss-sg/lynx-website/assets/rspeedy-banner.png" alt="Rspeedy Logo" /></a>
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
<p>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</a>
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
|
-
The
|
|
14
|
+
The Rspack-based build tool for Lynx.
|
|
15
15
|
|
|
16
16
|
## Getting Started
|
|
17
17
|
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Config } from './index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Merge multiple Rspeedy configuration objects.
|
|
4
|
+
*
|
|
5
|
+
* @param configs - The Rspeedy configuration objects to merge.
|
|
6
|
+
*
|
|
7
|
+
* @returns The merged Rspeedy configuration object.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { mergeRspeedyConfig } from '@lynx-js/rspeedy';
|
|
13
|
+
*
|
|
14
|
+
* const config1 = {
|
|
15
|
+
* dev: {
|
|
16
|
+
* writeToDisk: false,
|
|
17
|
+
* },
|
|
18
|
+
* };
|
|
19
|
+
* const config2 = {
|
|
20
|
+
* dev: {
|
|
21
|
+
* writeToDisk: true,
|
|
22
|
+
* },
|
|
23
|
+
* };
|
|
24
|
+
*
|
|
25
|
+
* const mergedConfig = mergeRspeedyConfig(config1, config2);
|
|
26
|
+
*
|
|
27
|
+
* console.log(mergedConfig); // { dev: { writeToDisk: true } }
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @remarks
|
|
31
|
+
*
|
|
32
|
+
* This is actually an alias of {@link https://rsbuild.dev/api/javascript-api/core#mergersbuildconfig | mergeRsbuildConfig}.
|
|
33
|
+
*
|
|
34
|
+
* @public
|
|
35
|
+
*/
|
|
36
|
+
export declare function mergeRspeedyConfig(...configs: Config[]): Config;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// Copyright 2024 The Lynx Authors. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
|
+
// LICENSE file in the root directory of this source tree.
|
|
4
|
+
import { mergeRsbuildConfig } from '@rsbuild/core';
|
|
5
|
+
/**
|
|
6
|
+
* Merge multiple Rspeedy configuration objects.
|
|
7
|
+
*
|
|
8
|
+
* @param configs - The Rspeedy configuration objects to merge.
|
|
9
|
+
*
|
|
10
|
+
* @returns The merged Rspeedy configuration object.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { mergeRspeedyConfig } from '@lynx-js/rspeedy';
|
|
16
|
+
*
|
|
17
|
+
* const config1 = {
|
|
18
|
+
* dev: {
|
|
19
|
+
* writeToDisk: false,
|
|
20
|
+
* },
|
|
21
|
+
* };
|
|
22
|
+
* const config2 = {
|
|
23
|
+
* dev: {
|
|
24
|
+
* writeToDisk: true,
|
|
25
|
+
* },
|
|
26
|
+
* };
|
|
27
|
+
*
|
|
28
|
+
* const mergedConfig = mergeRspeedyConfig(config1, config2);
|
|
29
|
+
*
|
|
30
|
+
* console.log(mergedConfig); // { dev: { writeToDisk: true } }
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* @remarks
|
|
34
|
+
*
|
|
35
|
+
* This is actually an alias of {@link https://rsbuild.dev/api/javascript-api/core#mergersbuildconfig | mergeRsbuildConfig}.
|
|
36
|
+
*
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
export function mergeRspeedyConfig(...configs) {
|
|
40
|
+
return mergeRsbuildConfig(...configs);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=mergeRspeedyConfig.js.map
|
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
5
|
export interface Server {
|
|
6
|
+
/**
|
|
7
|
+
* Configure the base path of the server.
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* By default, the base path of the server is `/`, and users can access lynx bundle through `http://<host>:<port>/main.lynx.bundle`
|
|
11
|
+
*
|
|
12
|
+
* If you want to access lynx bundle through `http://<host>:<port>/foo/main.lynx.bundle`, you can change `server.base` to `/foo`
|
|
13
|
+
*
|
|
14
|
+
* you can refer to {@link https://rsbuild.dev/config/server/base | server.base } for more information.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
*
|
|
18
|
+
* ```js
|
|
19
|
+
* import { defineConfig } from '@lynx-js/rspeedy'
|
|
20
|
+
* export default defineConfig({
|
|
21
|
+
* server: {
|
|
22
|
+
* base: '/dist'
|
|
23
|
+
* },
|
|
24
|
+
* })
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
base?: string | undefined;
|
|
6
28
|
/**
|
|
7
29
|
* Adds headers to all responses.
|
|
8
30
|
*
|