@lynx-js/rspeedy-canary 0.11.3 → 0.11.4-canary-20250922-b26b9287
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 +60 -54
- package/dist/0~src_config_validate_ts.js +237 -187
- package/dist/1~src_cli_build_ts.js +1 -0
- package/dist/1~src_cli_dev_ts.js +1 -0
- package/dist/1~src_cli_inspect_ts.js +1 -0
- package/dist/1~src_cli_preview_ts.js +1 -0
- package/dist/1~src_config_validate_ts.js +237 -187
- package/dist/index.d.ts +54 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
17
|
|
|
18
|
+
import type { CompressOptions } from '@rsbuild/core';
|
|
18
19
|
import type { CreateRsbuildOptions } from '@rsbuild/core';
|
|
19
20
|
import type { DataUriLimit } from '@rsbuild/core';
|
|
20
21
|
import type { DistPathConfig } from '@rsbuild/core';
|
|
@@ -2724,6 +2725,59 @@ export declare interface Server {
|
|
|
2724
2725
|
* ```
|
|
2725
2726
|
*/
|
|
2726
2727
|
base?: string | undefined;
|
|
2728
|
+
/**
|
|
2729
|
+
* Configure whether to enable {@link https://developer.mozilla.org/en-US/docs/Glossary/gzip_compression | gzip compression } for static assets served by the dev server or preview server.
|
|
2730
|
+
*
|
|
2731
|
+
* Default: true
|
|
2732
|
+
*
|
|
2733
|
+
* See {@link https://rsbuild.rs/config/server/compress | Rsbuild - server.compress } for details.
|
|
2734
|
+
*
|
|
2735
|
+
* @example
|
|
2736
|
+
*
|
|
2737
|
+
* To disable the gzip compression, set compress to false:
|
|
2738
|
+
*
|
|
2739
|
+
* ```js
|
|
2740
|
+
* export default {
|
|
2741
|
+
* server: {
|
|
2742
|
+
* compress: false,
|
|
2743
|
+
* },
|
|
2744
|
+
* }
|
|
2745
|
+
* ```
|
|
2746
|
+
*
|
|
2747
|
+
* @example
|
|
2748
|
+
*
|
|
2749
|
+
* Compress if it starts with /foo
|
|
2750
|
+
*
|
|
2751
|
+
* ```js
|
|
2752
|
+
* export default {
|
|
2753
|
+
* server: {
|
|
2754
|
+
* compress: {
|
|
2755
|
+
* filter: (req) => {
|
|
2756
|
+
* if (req.url?.includes('/foo')) {
|
|
2757
|
+
* return false;
|
|
2758
|
+
* }
|
|
2759
|
+
* return true;
|
|
2760
|
+
* },
|
|
2761
|
+
* },
|
|
2762
|
+
* },
|
|
2763
|
+
* }
|
|
2764
|
+
* ```
|
|
2765
|
+
*
|
|
2766
|
+
* @example
|
|
2767
|
+
*
|
|
2768
|
+
* set level of zlib compression
|
|
2769
|
+
*
|
|
2770
|
+
* ```js
|
|
2771
|
+
* export default {
|
|
2772
|
+
* server: {
|
|
2773
|
+
* compress: {
|
|
2774
|
+
* level: 6,
|
|
2775
|
+
* },
|
|
2776
|
+
* },
|
|
2777
|
+
* }
|
|
2778
|
+
* ```
|
|
2779
|
+
*/
|
|
2780
|
+
compress?: boolean | CompressOptions | undefined;
|
|
2727
2781
|
/**
|
|
2728
2782
|
* Adds headers to all responses.
|
|
2729
2783
|
*
|
package/dist/index.js
CHANGED