@lynx-js/rspeedy-canary 0.11.5 → 0.11.6-canary-20251010-ff13127d

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.6-canary-20251010062941-ff13127d391082e8ed65a2ea89eb9d89a63a7207
4
+
5
+ ### Patch Changes
6
+
7
+ - Support CLI flag `--root` to specify the root of the project. ([#1836](https://github.com/lynx-family/lynx-stack/pull/1836))
8
+
3
9
  ## 0.11.5
4
10
 
5
11
  ### Patch Changes
@@ -37,11 +43,11 @@
37
43
  - Support `command` and `env` parameters in the function exported by `lynx.config.js`. ([#1669](https://github.com/lynx-family/lynx-stack/pull/1669))
38
44
 
39
45
  ```js
40
- import { defineConfig } from '@lynx-js/rspeedy'
46
+ import { defineConfig } from "@lynx-js/rspeedy";
41
47
 
42
48
  export default defineConfig(({ command, env }) => {
43
- const isBuild = command === 'build'
44
- const isTest = env === 'test'
49
+ const isBuild = command === "build";
50
+ const isTest = env === "test";
45
51
 
46
52
  return {
47
53
  output: {
@@ -50,8 +56,8 @@
50
56
  performance: {
51
57
  buildCache: isBuild,
52
58
  },
53
- }
54
- })
59
+ };
60
+ });
55
61
  ```
56
62
 
57
63
  - Support `resolve.dedupe`. ([#1671](https://github.com/lynx-family/lynx-stack/pull/1671))
@@ -59,30 +65,30 @@
59
65
  This is useful when having multiple duplicated packages in the bundle:
60
66
 
61
67
  ```js
62
- import { defineConfig } from '@lynx-js/rspeedy'
68
+ import { defineConfig } from "@lynx-js/rspeedy";
63
69
 
64
70
  export default defineConfig({
65
71
  resolve: {
66
- dedupe: ['tslib'],
72
+ dedupe: ["tslib"],
67
73
  },
68
- })
74
+ });
69
75
  ```
70
76
 
71
77
  - Support `resolve.aliasStrategy` for controlling priority between `tsconfig.json` paths and `resolve.alias` ([#1722](https://github.com/lynx-family/lynx-stack/pull/1722))
72
78
 
73
79
  ```js
74
- import { defineConfig } from '@lynx-js/rspeedy'
80
+ import { defineConfig } from "@lynx-js/rspeedy";
75
81
 
76
82
  export default defineConfig({
77
83
  resolve: {
78
84
  alias: {
79
- '@': './src',
85
+ "@": "./src",
80
86
  },
81
87
  // 'prefer-tsconfig' (default): tsconfig.json paths take priority
82
88
  // 'prefer-alias': resolve.alias takes priority
83
- aliasStrategy: 'prefer-alias',
89
+ aliasStrategy: "prefer-alias",
84
90
  },
85
- })
91
+ });
86
92
  ```
87
93
 
88
94
  - Bump Rsbuild v1.5.4 with Rspack v1.5.2. ([#1644](https://github.com/lynx-family/lynx-stack/pull/1644))
@@ -102,7 +108,7 @@
102
108
  - Add `output.dataUriLimit.*` for fine-grained control of asset inlining. ([#1648](https://github.com/lynx-family/lynx-stack/pull/1648))
103
109
 
104
110
  ```js
105
- import { defineConfig } from '@lynx-js/rspeedy'
111
+ import { defineConfig } from "@lynx-js/rspeedy";
106
112
 
107
113
  export default defineConfig({
108
114
  output: {
@@ -111,7 +117,7 @@
111
117
  media: 0,
112
118
  },
113
119
  },
114
- })
120
+ });
115
121
  ```
116
122
 
117
123
  ## 0.11.0
@@ -231,28 +237,28 @@
231
237
 
232
238
  ```ts
233
239
  type InlineChunkTestFunction = (params: {
234
- size: number
235
- name: string
236
- }) => boolean
240
+ size: number;
241
+ name: string;
242
+ }) => boolean;
237
243
 
238
- type InlineChunkTest = RegExp | InlineChunkTestFunction
244
+ type InlineChunkTest = RegExp | InlineChunkTestFunction;
239
245
 
240
246
  type InlineChunkConfig =
241
247
  | boolean
242
248
  | InlineChunkTest
243
- | { enable?: boolean | 'auto', test: InlineChunkTest }
249
+ | { enable?: boolean | "auto"; test: InlineChunkTest };
244
250
  ```
245
251
 
246
252
  ```ts
247
- import { defineConfig } from '@lynx-js/rspeedy'
253
+ import { defineConfig } from "@lynx-js/rspeedy";
248
254
 
249
255
  export default defineConfig({
250
256
  output: {
251
257
  inlineScripts: ({ name, size }) => {
252
- return name.includes('foo') && size < 1000
258
+ return name.includes("foo") && size < 1000;
253
259
  },
254
260
  },
255
- })
261
+ });
256
262
  ```
257
263
 
258
264
  - docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
@@ -295,13 +301,13 @@
295
301
  example:
296
302
 
297
303
  ```js
298
- import { defineConfig } from '@lynx-js/rspeedy'
304
+ import { defineConfig } from "@lynx-js/rspeedy";
299
305
 
300
306
  export default defineConfig({
301
307
  output: {
302
308
  inlineScripts: false,
303
309
  },
304
- })
310
+ });
305
311
  ```
306
312
 
307
313
  - Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
@@ -321,12 +327,12 @@
321
327
  example:
322
328
 
323
329
  ```js
324
- import { defineConfig } from '@lynx-js/rspeedy'
330
+ import { defineConfig } from "@lynx-js/rspeedy";
325
331
  export default defineConfig({
326
332
  source: {
327
- preEntry: './src/polyfill.ts',
333
+ preEntry: "./src/polyfill.ts",
328
334
  },
329
- })
335
+ });
330
336
  ```
331
337
 
332
338
  - Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
@@ -337,17 +343,17 @@
337
343
 
338
344
  ```js
339
345
  export const myPlugin = {
340
- name: 'my-plugin',
346
+ name: "my-plugin",
341
347
  setup(api) {
342
- const { callerName } = api.context
348
+ const { callerName } = api.context;
343
349
 
344
- if (callerName === 'rslib') {
350
+ if (callerName === "rslib") {
345
351
  // ...
346
- } else if (callerName === 'rspeedy') {
352
+ } else if (callerName === "rspeedy") {
347
353
  // ...
348
354
  }
349
355
  },
350
- }
356
+ };
351
357
  ```
352
358
 
353
359
  - Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
@@ -370,7 +376,7 @@
370
376
  Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
371
377
 
372
378
  ```js
373
- import { defineConfig } from '@lynx-js/rspeedy'
379
+ import { defineConfig } from "@lynx-js/rspeedy";
374
380
 
375
381
  export default defineConfig({
376
382
  tools: {
@@ -380,7 +386,7 @@
380
386
  },
381
387
  },
382
388
  },
383
- })
389
+ });
384
390
  ```
385
391
 
386
392
  See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
@@ -512,12 +518,12 @@
512
518
  example:
513
519
 
514
520
  ```js
515
- import { defineConfig } from '@lynx-js/rspeedy'
521
+ import { defineConfig } from "@lynx-js/rspeedy";
516
522
  export default defineConfig({
517
523
  server: {
518
- base: '/dist',
524
+ base: "/dist",
519
525
  },
520
- })
526
+ });
521
527
  ```
522
528
 
523
529
  - Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
@@ -570,11 +576,11 @@
570
576
  You can switch to other tools by using:
571
577
 
572
578
  ```js
573
- import { defineConfig } from '@lynx-js/rspeedy'
579
+ import { defineConfig } from "@lynx-js/rspeedy";
574
580
  import {
575
581
  CssMinimizerWebpackPlugin,
576
582
  pluginCssMinimizer,
577
- } from '@rsbuild/plugin-css-minimizer'
583
+ } from "@rsbuild/plugin-css-minimizer";
578
584
 
579
585
  export default defineConfig({
580
586
  plugins: [
@@ -587,7 +593,7 @@
587
593
  },
588
594
  }),
589
595
  ],
590
- })
596
+ });
591
597
  ```
592
598
 
593
599
  See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
@@ -597,8 +603,8 @@
597
603
  You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
598
604
 
599
605
  ```js
600
- import { defineConfig } from '@lynx-js/rspeedy'
601
- import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
606
+ import { defineConfig } from "@lynx-js/rspeedy";
607
+ import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
602
608
 
603
609
  export default defineConfig({
604
610
  plugins: [
@@ -610,7 +616,7 @@
610
616
  },
611
617
  }),
612
618
  ],
613
- })
619
+ });
614
620
  ```
615
621
 
616
622
  ## 0.7.1
@@ -630,7 +636,7 @@
630
636
  You may turn it off using `output.minify.css: false`:
631
637
 
632
638
  ```js
633
- import { defineConfig } from '@lynx-js/rspeedy'
639
+ import { defineConfig } from "@lynx-js/rspeedy";
634
640
 
635
641
  export default defineConfig({
636
642
  output: {
@@ -638,18 +644,18 @@
638
644
  css: false,
639
645
  },
640
646
  },
641
- })
647
+ });
642
648
  ```
643
649
 
644
650
  Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
645
651
 
646
652
  ```js
647
- import { defineConfig } from '@lynx-js/rspeedy'
648
- import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
653
+ import { defineConfig } from "@lynx-js/rspeedy";
654
+ import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
649
655
 
650
656
  export default defineConfig({
651
657
  plugins: [pluginCssMinimizer()],
652
- })
658
+ });
653
659
  ```
654
660
 
655
661
  - 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
@@ -676,22 +682,22 @@
676
682
  - The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
677
683
 
678
684
  ```js
679
- import { defineConfig } from '@lynx-js/rspeedy'
685
+ import { defineConfig } from "@lynx-js/rspeedy";
680
686
 
681
687
  export default defineConfig({
682
688
  dev: {
683
689
  watchFiles: [
684
690
  {
685
- type: 'reload-server',
686
- paths: ['public/**/*.txt'],
691
+ type: "reload-server",
692
+ paths: ["public/**/*.txt"],
687
693
  },
688
694
  {
689
- type: 'reload-page',
690
- paths: ['public/**/*.json'],
695
+ type: "reload-page",
696
+ paths: ["public/**/*.json"],
691
697
  },
692
698
  ],
693
699
  },
694
- })
700
+ });
695
701
  ```
696
702
 
697
703
  - be9b003: Add `source.exclude`.