@lynx-js/rspeedy-canary 0.11.3 → 0.11.4-canary-20250922-209878c2

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @lynx-js/rspeedy
2
2
 
3
+ ## 0.11.4-canary-20250922065413-209878c2a8457ed68662e52967b8612129d73c44
4
+
5
+ ### Patch Changes
6
+
7
+ - Support `server.compress` ([#1799](https://github.com/lynx-family/lynx-stack/pull/1799))
8
+
3
9
  ## 0.11.3
4
10
 
5
11
  ### Patch Changes
@@ -19,11 +25,11 @@
19
25
  - Support `command` and `env` parameters in the function exported by `lynx.config.js`. ([#1669](https://github.com/lynx-family/lynx-stack/pull/1669))
20
26
 
21
27
  ```js
22
- import { defineConfig } from '@lynx-js/rspeedy'
28
+ import { defineConfig } from "@lynx-js/rspeedy";
23
29
 
24
30
  export default defineConfig(({ command, env }) => {
25
- const isBuild = command === 'build'
26
- const isTest = env === 'test'
31
+ const isBuild = command === "build";
32
+ const isTest = env === "test";
27
33
 
28
34
  return {
29
35
  output: {
@@ -32,8 +38,8 @@
32
38
  performance: {
33
39
  buildCache: isBuild,
34
40
  },
35
- }
36
- })
41
+ };
42
+ });
37
43
  ```
38
44
 
39
45
  - Support `resolve.dedupe`. ([#1671](https://github.com/lynx-family/lynx-stack/pull/1671))
@@ -41,30 +47,30 @@
41
47
  This is useful when having multiple duplicated packages in the bundle:
42
48
 
43
49
  ```js
44
- import { defineConfig } from '@lynx-js/rspeedy'
50
+ import { defineConfig } from "@lynx-js/rspeedy";
45
51
 
46
52
  export default defineConfig({
47
53
  resolve: {
48
- dedupe: ['tslib'],
54
+ dedupe: ["tslib"],
49
55
  },
50
- })
56
+ });
51
57
  ```
52
58
 
53
59
  - Support `resolve.aliasStrategy` for controlling priority between `tsconfig.json` paths and `resolve.alias` ([#1722](https://github.com/lynx-family/lynx-stack/pull/1722))
54
60
 
55
61
  ```js
56
- import { defineConfig } from '@lynx-js/rspeedy'
62
+ import { defineConfig } from "@lynx-js/rspeedy";
57
63
 
58
64
  export default defineConfig({
59
65
  resolve: {
60
66
  alias: {
61
- '@': './src',
67
+ "@": "./src",
62
68
  },
63
69
  // 'prefer-tsconfig' (default): tsconfig.json paths take priority
64
70
  // 'prefer-alias': resolve.alias takes priority
65
- aliasStrategy: 'prefer-alias',
71
+ aliasStrategy: "prefer-alias",
66
72
  },
67
- })
73
+ });
68
74
  ```
69
75
 
70
76
  - Bump Rsbuild v1.5.4 with Rspack v1.5.2. ([#1644](https://github.com/lynx-family/lynx-stack/pull/1644))
@@ -84,7 +90,7 @@
84
90
  - Add `output.dataUriLimit.*` for fine-grained control of asset inlining. ([#1648](https://github.com/lynx-family/lynx-stack/pull/1648))
85
91
 
86
92
  ```js
87
- import { defineConfig } from '@lynx-js/rspeedy'
93
+ import { defineConfig } from "@lynx-js/rspeedy";
88
94
 
89
95
  export default defineConfig({
90
96
  output: {
@@ -93,7 +99,7 @@
93
99
  media: 0,
94
100
  },
95
101
  },
96
- })
102
+ });
97
103
  ```
98
104
 
99
105
  ## 0.11.0
@@ -213,28 +219,28 @@
213
219
 
214
220
  ```ts
215
221
  type InlineChunkTestFunction = (params: {
216
- size: number
217
- name: string
218
- }) => boolean
222
+ size: number;
223
+ name: string;
224
+ }) => boolean;
219
225
 
220
- type InlineChunkTest = RegExp | InlineChunkTestFunction
226
+ type InlineChunkTest = RegExp | InlineChunkTestFunction;
221
227
 
222
228
  type InlineChunkConfig =
223
229
  | boolean
224
230
  | InlineChunkTest
225
- | { enable?: boolean | 'auto', test: InlineChunkTest }
231
+ | { enable?: boolean | "auto"; test: InlineChunkTest };
226
232
  ```
227
233
 
228
234
  ```ts
229
- import { defineConfig } from '@lynx-js/rspeedy'
235
+ import { defineConfig } from "@lynx-js/rspeedy";
230
236
 
231
237
  export default defineConfig({
232
238
  output: {
233
239
  inlineScripts: ({ name, size }) => {
234
- return name.includes('foo') && size < 1000
240
+ return name.includes("foo") && size < 1000;
235
241
  },
236
242
  },
237
- })
243
+ });
238
244
  ```
239
245
 
240
246
  - docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
@@ -277,13 +283,13 @@
277
283
  example:
278
284
 
279
285
  ```js
280
- import { defineConfig } from '@lynx-js/rspeedy'
286
+ import { defineConfig } from "@lynx-js/rspeedy";
281
287
 
282
288
  export default defineConfig({
283
289
  output: {
284
290
  inlineScripts: false,
285
291
  },
286
- })
292
+ });
287
293
  ```
288
294
 
289
295
  - Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
@@ -303,12 +309,12 @@
303
309
  example:
304
310
 
305
311
  ```js
306
- import { defineConfig } from '@lynx-js/rspeedy'
312
+ import { defineConfig } from "@lynx-js/rspeedy";
307
313
  export default defineConfig({
308
314
  source: {
309
- preEntry: './src/polyfill.ts',
315
+ preEntry: "./src/polyfill.ts",
310
316
  },
311
- })
317
+ });
312
318
  ```
313
319
 
314
320
  - Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
@@ -319,17 +325,17 @@
319
325
 
320
326
  ```js
321
327
  export const myPlugin = {
322
- name: 'my-plugin',
328
+ name: "my-plugin",
323
329
  setup(api) {
324
- const { callerName } = api.context
330
+ const { callerName } = api.context;
325
331
 
326
- if (callerName === 'rslib') {
332
+ if (callerName === "rslib") {
327
333
  // ...
328
- } else if (callerName === 'rspeedy') {
334
+ } else if (callerName === "rspeedy") {
329
335
  // ...
330
336
  }
331
337
  },
332
- }
338
+ };
333
339
  ```
334
340
 
335
341
  - Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
@@ -352,7 +358,7 @@
352
358
  Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
353
359
 
354
360
  ```js
355
- import { defineConfig } from '@lynx-js/rspeedy'
361
+ import { defineConfig } from "@lynx-js/rspeedy";
356
362
 
357
363
  export default defineConfig({
358
364
  tools: {
@@ -362,7 +368,7 @@
362
368
  },
363
369
  },
364
370
  },
365
- })
371
+ });
366
372
  ```
367
373
 
368
374
  See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
@@ -494,12 +500,12 @@
494
500
  example:
495
501
 
496
502
  ```js
497
- import { defineConfig } from '@lynx-js/rspeedy'
503
+ import { defineConfig } from "@lynx-js/rspeedy";
498
504
  export default defineConfig({
499
505
  server: {
500
- base: '/dist',
506
+ base: "/dist",
501
507
  },
502
- })
508
+ });
503
509
  ```
504
510
 
505
511
  - Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
@@ -552,11 +558,11 @@
552
558
  You can switch to other tools by using:
553
559
 
554
560
  ```js
555
- import { defineConfig } from '@lynx-js/rspeedy'
561
+ import { defineConfig } from "@lynx-js/rspeedy";
556
562
  import {
557
563
  CssMinimizerWebpackPlugin,
558
564
  pluginCssMinimizer,
559
- } from '@rsbuild/plugin-css-minimizer'
565
+ } from "@rsbuild/plugin-css-minimizer";
560
566
 
561
567
  export default defineConfig({
562
568
  plugins: [
@@ -569,7 +575,7 @@
569
575
  },
570
576
  }),
571
577
  ],
572
- })
578
+ });
573
579
  ```
574
580
 
575
581
  See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
@@ -579,8 +585,8 @@
579
585
  You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
580
586
 
581
587
  ```js
582
- import { defineConfig } from '@lynx-js/rspeedy'
583
- import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
588
+ import { defineConfig } from "@lynx-js/rspeedy";
589
+ import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
584
590
 
585
591
  export default defineConfig({
586
592
  plugins: [
@@ -592,7 +598,7 @@
592
598
  },
593
599
  }),
594
600
  ],
595
- })
601
+ });
596
602
  ```
597
603
 
598
604
  ## 0.7.1
@@ -612,7 +618,7 @@
612
618
  You may turn it off using `output.minify.css: false`:
613
619
 
614
620
  ```js
615
- import { defineConfig } from '@lynx-js/rspeedy'
621
+ import { defineConfig } from "@lynx-js/rspeedy";
616
622
 
617
623
  export default defineConfig({
618
624
  output: {
@@ -620,18 +626,18 @@
620
626
  css: false,
621
627
  },
622
628
  },
623
- })
629
+ });
624
630
  ```
625
631
 
626
632
  Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
627
633
 
628
634
  ```js
629
- import { defineConfig } from '@lynx-js/rspeedy'
630
- import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
635
+ import { defineConfig } from "@lynx-js/rspeedy";
636
+ import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
631
637
 
632
638
  export default defineConfig({
633
639
  plugins: [pluginCssMinimizer()],
634
- })
640
+ });
635
641
  ```
636
642
 
637
643
  - 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
@@ -658,22 +664,22 @@
658
664
  - The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
659
665
 
660
666
  ```js
661
- import { defineConfig } from '@lynx-js/rspeedy'
667
+ import { defineConfig } from "@lynx-js/rspeedy";
662
668
 
663
669
  export default defineConfig({
664
670
  dev: {
665
671
  watchFiles: [
666
672
  {
667
- type: 'reload-server',
668
- paths: ['public/**/*.txt'],
673
+ type: "reload-server",
674
+ paths: ["public/**/*.txt"],
669
675
  },
670
676
  {
671
- type: 'reload-page',
672
- paths: ['public/**/*.json'],
677
+ type: "reload-page",
678
+ paths: ["public/**/*.json"],
673
679
  },
674
680
  ],
675
681
  },
676
- })
682
+ });
677
683
  ```
678
684
 
679
685
  - be9b003: Add `source.exclude`.