@lynx-js/rspeedy-canary 0.11.4-canary-20250922-1e342fe5 → 0.11.4-canary-20250923-e5e646b4

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/dist/index.d.ts CHANGED
@@ -32,6 +32,7 @@ import { version as rsbuildVersion } from '@rsbuild/core';
32
32
  import type { RsdoctorRspackPlugin } from '@rsdoctor/rspack-plugin';
33
33
  import { Rspack } from '@rsbuild/core';
34
34
  import { rspack } from '@rsbuild/core';
35
+ import type { ServerConfig } from '@rsbuild/core';
35
36
  import type { ToolsConfig } from '@rsbuild/core';
36
37
  import type { WatchFiles } from '@rsbuild/core';
37
38
 
@@ -2778,6 +2779,30 @@ export declare interface Server {
2778
2779
  * ```
2779
2780
  */
2780
2781
  compress?: boolean | CompressOptions | undefined;
2782
+ /**
2783
+ * Configure CORS for the dev server or preview server.
2784
+ *
2785
+ * - Set to an object to enable CORS with the specified options.
2786
+ *
2787
+ * - Set to `true` to enable CORS with the default options (allows all origins, not recommended).
2788
+ *
2789
+ * - Set to `false` to disable CORS.
2790
+ *
2791
+ * See {@link https://rsbuild.rs/config/server/cors | Rsbuild - server.cors } for details.
2792
+ *
2793
+ * @example
2794
+ *
2795
+ * ```js
2796
+ * export default {
2797
+ * server: {
2798
+ * cors: {
2799
+ * origin: 'https://example.com',
2800
+ * },
2801
+ * },
2802
+ * }
2803
+ * ```
2804
+ */
2805
+ cors?: ServerConfig['cors'] | undefined;
2781
2806
  /**
2782
2807
  * Adds headers to all responses.
2783
2808
  *
package/dist/index.js CHANGED
@@ -365,6 +365,7 @@ function toRsbuildConfig(config) {
365
365
  server: {
366
366
  base: config.server?.base,
367
367
  compress: config.server?.compress,
368
+ cors: config.server?.cors,
368
369
  headers: config.server?.headers,
369
370
  host: config.server?.host,
370
371
  port: config.server?.port,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynx-js/rspeedy-canary",
3
- "version": "0.11.4-canary-20250922-1e342fe5",
3
+ "version": "0.11.4-canary-20250923-e5e646b4",
4
4
  "description": "A webpack/rspack-based frontend toolchain for Lynx",
5
5
  "keywords": [
6
6
  "webpack",