@lynx-js/rspeedy-canary 0.12.4 → 0.12.5-canary-20251230-bba05e2e

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +61 -54
  2. package/dist/0~src_cli_exit_ts.js +1 -1
  3. package/dist/0~src_config_validate_ts.js +2464 -2471
  4. package/dist/0~src_plugins_api_plugin_ts.js +1 -1
  5. package/dist/0~src_plugins_chunkLoading_plugin_ts.js +1 -1
  6. package/dist/0~src_plugins_dev_plugin_ts.js +1 -1
  7. package/dist/0~src_plugins_emitOnErrors_plugin_ts.js +1 -1
  8. package/dist/0~src_plugins_index_ts.js +1 -1
  9. package/dist/0~src_plugins_inspect_plugin_ts.js +2 -2
  10. package/dist/0~src_plugins_minify_plugin_ts.js +1 -1
  11. package/dist/0~src_plugins_optimization_plugin_ts.js +1 -1
  12. package/dist/0~src_plugins_output_plugin_ts.js +2 -2
  13. package/dist/0~src_plugins_resolve_plugin_ts.js +1 -1
  14. package/dist/0~src_plugins_rsdoctor_plugin_ts.js +1 -1
  15. package/dist/0~src_plugins_sourcemap_plugin_ts.js +1 -1
  16. package/dist/0~src_plugins_swc_plugin_ts.js +2 -2
  17. package/dist/0~src_plugins_target_plugin_ts.js +2 -2
  18. package/dist/0~vendors-node_modules_pnpm_javascript-stringify_2_1_0_node_modules_javascript-stringify_dist_i-562fbc.js +6 -6
  19. package/dist/1~src_cli_build_ts.js +6 -6
  20. package/dist/1~src_cli_commands_ts.js +2 -2
  21. package/dist/1~src_cli_dev_ts.js +5 -5
  22. package/dist/1~src_cli_inspect_ts.js +4 -4
  23. package/dist/1~src_cli_preview_ts.js +4 -4
  24. package/dist/1~src_config_validate_ts.js +2464 -2471
  25. package/dist/1~src_plugins_api_plugin_ts.js +1 -1
  26. package/dist/1~src_plugins_chunkLoading_plugin_ts.js +1 -1
  27. package/dist/1~src_plugins_dev_plugin_ts.js +1 -1
  28. package/dist/1~src_plugins_emitOnErrors_plugin_ts.js +1 -1
  29. package/dist/1~src_plugins_index_ts.js +1 -1
  30. package/dist/1~src_plugins_inspect_plugin_ts.js +2 -2
  31. package/dist/1~src_plugins_minify_plugin_ts.js +1 -1
  32. package/dist/1~src_plugins_optimization_plugin_ts.js +1 -1
  33. package/dist/1~src_plugins_output_plugin_ts.js +2 -2
  34. package/dist/1~src_plugins_resolve_plugin_ts.js +1 -1
  35. package/dist/1~src_plugins_rsdoctor_plugin_ts.js +2 -2
  36. package/dist/1~src_plugins_sourcemap_plugin_ts.js +1 -1
  37. package/dist/1~src_plugins_swc_plugin_ts.js +2 -2
  38. package/dist/1~src_plugins_target_plugin_ts.js +2 -2
  39. package/dist/1~src_version_ts.js +1 -1
  40. package/dist/1~vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js +1 -1
  41. package/dist/1~vendors-node_modules_pnpm_commander_13_1_0_node_modules_commander_esm_mjs.js +8 -8
  42. package/dist/1~vendors-node_modules_pnpm_javascript-stringify_2_1_0_node_modules_javascript-stringify_dist_i-562fbc.js +6 -6
  43. package/dist/cli/main.js +3 -3
  44. package/dist/index.js +4 -4
  45. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @lynx-js/rspeedy
2
2
 
3
+ ## 0.12.5-canary-20251230100304-bba05e2ed06cca8009ad415fd9777e8334a0887a
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @lynx-js/web-rsbuild-server-middleware@0.19.4-canary-20251230100304-bba05e2ed06cca8009ad415fd9777e8334a0887a
9
+
3
10
  ## 0.12.4
4
11
 
5
12
  ### Patch Changes
@@ -121,11 +128,11 @@
121
128
  - Support `command` and `env` parameters in the function exported by `lynx.config.js`. ([#1669](https://github.com/lynx-family/lynx-stack/pull/1669))
122
129
 
123
130
  ```js
124
- import { defineConfig } from '@lynx-js/rspeedy'
131
+ import { defineConfig } from "@lynx-js/rspeedy";
125
132
 
126
133
  export default defineConfig(({ command, env }) => {
127
- const isBuild = command === 'build'
128
- const isTest = env === 'test'
134
+ const isBuild = command === "build";
135
+ const isTest = env === "test";
129
136
 
130
137
  return {
131
138
  output: {
@@ -134,8 +141,8 @@
134
141
  performance: {
135
142
  buildCache: isBuild,
136
143
  },
137
- }
138
- })
144
+ };
145
+ });
139
146
  ```
140
147
 
141
148
  - Support `resolve.dedupe`. ([#1671](https://github.com/lynx-family/lynx-stack/pull/1671))
@@ -143,30 +150,30 @@
143
150
  This is useful when having multiple duplicated packages in the bundle:
144
151
 
145
152
  ```js
146
- import { defineConfig } from '@lynx-js/rspeedy'
153
+ import { defineConfig } from "@lynx-js/rspeedy";
147
154
 
148
155
  export default defineConfig({
149
156
  resolve: {
150
- dedupe: ['tslib'],
157
+ dedupe: ["tslib"],
151
158
  },
152
- })
159
+ });
153
160
  ```
154
161
 
155
162
  - Support `resolve.aliasStrategy` for controlling priority between `tsconfig.json` paths and `resolve.alias` ([#1722](https://github.com/lynx-family/lynx-stack/pull/1722))
156
163
 
157
164
  ```js
158
- import { defineConfig } from '@lynx-js/rspeedy'
165
+ import { defineConfig } from "@lynx-js/rspeedy";
159
166
 
160
167
  export default defineConfig({
161
168
  resolve: {
162
169
  alias: {
163
- '@': './src',
170
+ "@": "./src",
164
171
  },
165
172
  // 'prefer-tsconfig' (default): tsconfig.json paths take priority
166
173
  // 'prefer-alias': resolve.alias takes priority
167
- aliasStrategy: 'prefer-alias',
174
+ aliasStrategy: "prefer-alias",
168
175
  },
169
- })
176
+ });
170
177
  ```
171
178
 
172
179
  - Bump Rsbuild v1.5.4 with Rspack v1.5.2. ([#1644](https://github.com/lynx-family/lynx-stack/pull/1644))
@@ -186,7 +193,7 @@
186
193
  - Add `output.dataUriLimit.*` for fine-grained control of asset inlining. ([#1648](https://github.com/lynx-family/lynx-stack/pull/1648))
187
194
 
188
195
  ```js
189
- import { defineConfig } from '@lynx-js/rspeedy'
196
+ import { defineConfig } from "@lynx-js/rspeedy";
190
197
 
191
198
  export default defineConfig({
192
199
  output: {
@@ -195,7 +202,7 @@
195
202
  media: 0,
196
203
  },
197
204
  },
198
- })
205
+ });
199
206
  ```
200
207
 
201
208
  ## 0.11.0
@@ -315,28 +322,28 @@
315
322
 
316
323
  ```ts
317
324
  type InlineChunkTestFunction = (params: {
318
- size: number
319
- name: string
320
- }) => boolean
325
+ size: number;
326
+ name: string;
327
+ }) => boolean;
321
328
 
322
- type InlineChunkTest = RegExp | InlineChunkTestFunction
329
+ type InlineChunkTest = RegExp | InlineChunkTestFunction;
323
330
 
324
331
  type InlineChunkConfig =
325
332
  | boolean
326
333
  | InlineChunkTest
327
- | { enable?: boolean | 'auto', test: InlineChunkTest }
334
+ | { enable?: boolean | "auto"; test: InlineChunkTest };
328
335
  ```
329
336
 
330
337
  ```ts
331
- import { defineConfig } from '@lynx-js/rspeedy'
338
+ import { defineConfig } from "@lynx-js/rspeedy";
332
339
 
333
340
  export default defineConfig({
334
341
  output: {
335
342
  inlineScripts: ({ name, size }) => {
336
- return name.includes('foo') && size < 1000
343
+ return name.includes("foo") && size < 1000;
337
344
  },
338
345
  },
339
- })
346
+ });
340
347
  ```
341
348
 
342
349
  - docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
@@ -379,13 +386,13 @@
379
386
  example:
380
387
 
381
388
  ```js
382
- import { defineConfig } from '@lynx-js/rspeedy'
389
+ import { defineConfig } from "@lynx-js/rspeedy";
383
390
 
384
391
  export default defineConfig({
385
392
  output: {
386
393
  inlineScripts: false,
387
394
  },
388
- })
395
+ });
389
396
  ```
390
397
 
391
398
  - Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
@@ -405,12 +412,12 @@
405
412
  example:
406
413
 
407
414
  ```js
408
- import { defineConfig } from '@lynx-js/rspeedy'
415
+ import { defineConfig } from "@lynx-js/rspeedy";
409
416
  export default defineConfig({
410
417
  source: {
411
- preEntry: './src/polyfill.ts',
418
+ preEntry: "./src/polyfill.ts",
412
419
  },
413
- })
420
+ });
414
421
  ```
415
422
 
416
423
  - Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
@@ -421,17 +428,17 @@
421
428
 
422
429
  ```js
423
430
  export const myPlugin = {
424
- name: 'my-plugin',
431
+ name: "my-plugin",
425
432
  setup(api) {
426
- const { callerName } = api.context
433
+ const { callerName } = api.context;
427
434
 
428
- if (callerName === 'rslib') {
435
+ if (callerName === "rslib") {
429
436
  // ...
430
- } else if (callerName === 'rspeedy') {
437
+ } else if (callerName === "rspeedy") {
431
438
  // ...
432
439
  }
433
440
  },
434
- }
441
+ };
435
442
  ```
436
443
 
437
444
  - Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
@@ -454,7 +461,7 @@
454
461
  Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
455
462
 
456
463
  ```js
457
- import { defineConfig } from '@lynx-js/rspeedy'
464
+ import { defineConfig } from "@lynx-js/rspeedy";
458
465
 
459
466
  export default defineConfig({
460
467
  tools: {
@@ -464,7 +471,7 @@
464
471
  },
465
472
  },
466
473
  },
467
- })
474
+ });
468
475
  ```
469
476
 
470
477
  See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
@@ -596,12 +603,12 @@
596
603
  example:
597
604
 
598
605
  ```js
599
- import { defineConfig } from '@lynx-js/rspeedy'
606
+ import { defineConfig } from "@lynx-js/rspeedy";
600
607
  export default defineConfig({
601
608
  server: {
602
- base: '/dist',
609
+ base: "/dist",
603
610
  },
604
- })
611
+ });
605
612
  ```
606
613
 
607
614
  - Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
@@ -654,11 +661,11 @@
654
661
  You can switch to other tools by using:
655
662
 
656
663
  ```js
657
- import { defineConfig } from '@lynx-js/rspeedy'
664
+ import { defineConfig } from "@lynx-js/rspeedy";
658
665
  import {
659
666
  CssMinimizerWebpackPlugin,
660
667
  pluginCssMinimizer,
661
- } from '@rsbuild/plugin-css-minimizer'
668
+ } from "@rsbuild/plugin-css-minimizer";
662
669
 
663
670
  export default defineConfig({
664
671
  plugins: [
@@ -671,7 +678,7 @@
671
678
  },
672
679
  }),
673
680
  ],
674
- })
681
+ });
675
682
  ```
676
683
 
677
684
  See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
@@ -681,8 +688,8 @@
681
688
  You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
682
689
 
683
690
  ```js
684
- import { defineConfig } from '@lynx-js/rspeedy'
685
- import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
691
+ import { defineConfig } from "@lynx-js/rspeedy";
692
+ import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
686
693
 
687
694
  export default defineConfig({
688
695
  plugins: [
@@ -694,7 +701,7 @@
694
701
  },
695
702
  }),
696
703
  ],
697
- })
704
+ });
698
705
  ```
699
706
 
700
707
  ## 0.7.1
@@ -714,7 +721,7 @@
714
721
  You may turn it off using `output.minify.css: false`:
715
722
 
716
723
  ```js
717
- import { defineConfig } from '@lynx-js/rspeedy'
724
+ import { defineConfig } from "@lynx-js/rspeedy";
718
725
 
719
726
  export default defineConfig({
720
727
  output: {
@@ -722,18 +729,18 @@
722
729
  css: false,
723
730
  },
724
731
  },
725
- })
732
+ });
726
733
  ```
727
734
 
728
735
  Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
729
736
 
730
737
  ```js
731
- import { defineConfig } from '@lynx-js/rspeedy'
732
- import { pluginCssMinimizer } from '@rsbuild/plugin-css-minimizer'
738
+ import { defineConfig } from "@lynx-js/rspeedy";
739
+ import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
733
740
 
734
741
  export default defineConfig({
735
742
  plugins: [pluginCssMinimizer()],
736
- })
743
+ });
737
744
  ```
738
745
 
739
746
  - 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
@@ -760,22 +767,22 @@
760
767
  - The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
761
768
 
762
769
  ```js
763
- import { defineConfig } from '@lynx-js/rspeedy'
770
+ import { defineConfig } from "@lynx-js/rspeedy";
764
771
 
765
772
  export default defineConfig({
766
773
  dev: {
767
774
  watchFiles: [
768
775
  {
769
- type: 'reload-server',
770
- paths: ['public/**/*.txt'],
776
+ type: "reload-server",
777
+ paths: ["public/**/*.txt"],
771
778
  },
772
779
  {
773
- type: 'reload-page',
774
- paths: ['public/**/*.json'],
780
+ type: "reload-page",
781
+ paths: ["public/**/*.json"],
775
782
  },
776
783
  ],
777
784
  },
778
- })
785
+ });
779
786
  ```
780
787
 
781
788
  - be9b003: Add `source.exclude`.
@@ -4,7 +4,7 @@ export const __rspack_esm_ids = [
4
4
  "src_cli_exit_ts"
5
5
  ];
6
6
  export const __webpack_modules__ = {
7
- "./src/cli/exit.ts" (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7
+ "./src/cli/exit.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
8
8
  __webpack_require__.d(__webpack_exports__, {
9
9
  exit: ()=>exit_exit
10
10
  });