@lynx-js/rspeedy-canary 0.12.0 → 0.12.1-canary-20251129-2cd5c0c8
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 +63 -54
- package/dist/0~src_config_validate_ts.js +695 -695
- package/dist/0~src_plugins_api_plugin_ts.js +6 -6
- package/dist/0~src_plugins_index_ts.js +3 -3
- package/dist/0~src_plugins_minify_plugin_ts.js +3 -3
- package/dist/0~src_plugins_output_plugin_ts.js +2 -2
- package/dist/0~src_plugins_swc_plugin_ts.js +2 -2
- package/dist/1~events-fs-fs_promises-os-path-stream.js +12 -12
- package/dist/1~node_child_process-node_events-node_fs-node_path.js +8 -8
- package/dist/1~src_cli_build_ts.js +20 -20
- package/dist/1~src_cli_commands_ts.js +6 -6
- package/dist/1~src_cli_dev_ts.js +17 -17
- package/dist/1~src_cli_inspect_ts.js +11 -11
- package/dist/1~src_cli_preview_ts.js +15 -15
- package/dist/1~src_config_validate_ts.js +695 -695
- package/dist/1~src_plugins_api_plugin_ts.js +6 -6
- package/dist/1~src_plugins_index_ts.js +3 -3
- package/dist/1~src_plugins_minify_plugin_ts.js +3 -3
- package/dist/1~src_plugins_output_plugin_ts.js +2 -2
- package/dist/1~src_plugins_rsdoctor_plugin_ts.js +5 -5
- package/dist/1~src_plugins_swc_plugin_ts.js +2 -2
- package/dist/1~vendors-node_modules_pnpm_commander_13_1_0_node_modules_commander_esm_mjs.js +2 -2
- package/dist/cli/main.js +10 -10
- package/dist/index.js +10 -10
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
+
## 0.12.1-canary-20251129025626-2cd5c0c8d7c2e054c427d21763b420280c06d845
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Bump Rsbuild v1.6.9 with Rspack v1.6.5. ([#1967](https://github.com/lynx-family/lynx-stack/pull/1967))
|
|
8
|
+
|
|
9
|
+
- Updated dependencies []:
|
|
10
|
+
- @lynx-js/web-rsbuild-server-middleware@0.18.4
|
|
11
|
+
|
|
3
12
|
## 0.12.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
|
@@ -87,11 +96,11 @@
|
|
|
87
96
|
- Support `command` and `env` parameters in the function exported by `lynx.config.js`. ([#1669](https://github.com/lynx-family/lynx-stack/pull/1669))
|
|
88
97
|
|
|
89
98
|
```js
|
|
90
|
-
import { defineConfig } from
|
|
99
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
91
100
|
|
|
92
101
|
export default defineConfig(({ command, env }) => {
|
|
93
|
-
const isBuild = command ===
|
|
94
|
-
const isTest = env ===
|
|
102
|
+
const isBuild = command === "build";
|
|
103
|
+
const isTest = env === "test";
|
|
95
104
|
|
|
96
105
|
return {
|
|
97
106
|
output: {
|
|
@@ -100,8 +109,8 @@
|
|
|
100
109
|
performance: {
|
|
101
110
|
buildCache: isBuild,
|
|
102
111
|
},
|
|
103
|
-
}
|
|
104
|
-
})
|
|
112
|
+
};
|
|
113
|
+
});
|
|
105
114
|
```
|
|
106
115
|
|
|
107
116
|
- Support `resolve.dedupe`. ([#1671](https://github.com/lynx-family/lynx-stack/pull/1671))
|
|
@@ -109,30 +118,30 @@
|
|
|
109
118
|
This is useful when having multiple duplicated packages in the bundle:
|
|
110
119
|
|
|
111
120
|
```js
|
|
112
|
-
import { defineConfig } from
|
|
121
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
113
122
|
|
|
114
123
|
export default defineConfig({
|
|
115
124
|
resolve: {
|
|
116
|
-
dedupe: [
|
|
125
|
+
dedupe: ["tslib"],
|
|
117
126
|
},
|
|
118
|
-
})
|
|
127
|
+
});
|
|
119
128
|
```
|
|
120
129
|
|
|
121
130
|
- Support `resolve.aliasStrategy` for controlling priority between `tsconfig.json` paths and `resolve.alias` ([#1722](https://github.com/lynx-family/lynx-stack/pull/1722))
|
|
122
131
|
|
|
123
132
|
```js
|
|
124
|
-
import { defineConfig } from
|
|
133
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
125
134
|
|
|
126
135
|
export default defineConfig({
|
|
127
136
|
resolve: {
|
|
128
137
|
alias: {
|
|
129
|
-
|
|
138
|
+
"@": "./src",
|
|
130
139
|
},
|
|
131
140
|
// 'prefer-tsconfig' (default): tsconfig.json paths take priority
|
|
132
141
|
// 'prefer-alias': resolve.alias takes priority
|
|
133
|
-
aliasStrategy:
|
|
142
|
+
aliasStrategy: "prefer-alias",
|
|
134
143
|
},
|
|
135
|
-
})
|
|
144
|
+
});
|
|
136
145
|
```
|
|
137
146
|
|
|
138
147
|
- Bump Rsbuild v1.5.4 with Rspack v1.5.2. ([#1644](https://github.com/lynx-family/lynx-stack/pull/1644))
|
|
@@ -152,7 +161,7 @@
|
|
|
152
161
|
- Add `output.dataUriLimit.*` for fine-grained control of asset inlining. ([#1648](https://github.com/lynx-family/lynx-stack/pull/1648))
|
|
153
162
|
|
|
154
163
|
```js
|
|
155
|
-
import { defineConfig } from
|
|
164
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
156
165
|
|
|
157
166
|
export default defineConfig({
|
|
158
167
|
output: {
|
|
@@ -161,7 +170,7 @@
|
|
|
161
170
|
media: 0,
|
|
162
171
|
},
|
|
163
172
|
},
|
|
164
|
-
})
|
|
173
|
+
});
|
|
165
174
|
```
|
|
166
175
|
|
|
167
176
|
## 0.11.0
|
|
@@ -281,28 +290,28 @@
|
|
|
281
290
|
|
|
282
291
|
```ts
|
|
283
292
|
type InlineChunkTestFunction = (params: {
|
|
284
|
-
size: number
|
|
285
|
-
name: string
|
|
286
|
-
}) => boolean
|
|
293
|
+
size: number;
|
|
294
|
+
name: string;
|
|
295
|
+
}) => boolean;
|
|
287
296
|
|
|
288
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
297
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction;
|
|
289
298
|
|
|
290
299
|
type InlineChunkConfig =
|
|
291
300
|
| boolean
|
|
292
301
|
| InlineChunkTest
|
|
293
|
-
| { enable?: boolean |
|
|
302
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
294
303
|
```
|
|
295
304
|
|
|
296
305
|
```ts
|
|
297
|
-
import { defineConfig } from
|
|
306
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
298
307
|
|
|
299
308
|
export default defineConfig({
|
|
300
309
|
output: {
|
|
301
310
|
inlineScripts: ({ name, size }) => {
|
|
302
|
-
return name.includes(
|
|
311
|
+
return name.includes("foo") && size < 1000;
|
|
303
312
|
},
|
|
304
313
|
},
|
|
305
|
-
})
|
|
314
|
+
});
|
|
306
315
|
```
|
|
307
316
|
|
|
308
317
|
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
@@ -345,13 +354,13 @@
|
|
|
345
354
|
example:
|
|
346
355
|
|
|
347
356
|
```js
|
|
348
|
-
import { defineConfig } from
|
|
357
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
349
358
|
|
|
350
359
|
export default defineConfig({
|
|
351
360
|
output: {
|
|
352
361
|
inlineScripts: false,
|
|
353
362
|
},
|
|
354
|
-
})
|
|
363
|
+
});
|
|
355
364
|
```
|
|
356
365
|
|
|
357
366
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -371,12 +380,12 @@
|
|
|
371
380
|
example:
|
|
372
381
|
|
|
373
382
|
```js
|
|
374
|
-
import { defineConfig } from
|
|
383
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
375
384
|
export default defineConfig({
|
|
376
385
|
source: {
|
|
377
|
-
preEntry:
|
|
386
|
+
preEntry: "./src/polyfill.ts",
|
|
378
387
|
},
|
|
379
|
-
})
|
|
388
|
+
});
|
|
380
389
|
```
|
|
381
390
|
|
|
382
391
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -387,17 +396,17 @@
|
|
|
387
396
|
|
|
388
397
|
```js
|
|
389
398
|
export const myPlugin = {
|
|
390
|
-
name:
|
|
399
|
+
name: "my-plugin",
|
|
391
400
|
setup(api) {
|
|
392
|
-
const { callerName } = api.context
|
|
401
|
+
const { callerName } = api.context;
|
|
393
402
|
|
|
394
|
-
if (callerName ===
|
|
403
|
+
if (callerName === "rslib") {
|
|
395
404
|
// ...
|
|
396
|
-
} else if (callerName ===
|
|
405
|
+
} else if (callerName === "rspeedy") {
|
|
397
406
|
// ...
|
|
398
407
|
}
|
|
399
408
|
},
|
|
400
|
-
}
|
|
409
|
+
};
|
|
401
410
|
```
|
|
402
411
|
|
|
403
412
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -420,7 +429,7 @@
|
|
|
420
429
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
421
430
|
|
|
422
431
|
```js
|
|
423
|
-
import { defineConfig } from
|
|
432
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
424
433
|
|
|
425
434
|
export default defineConfig({
|
|
426
435
|
tools: {
|
|
@@ -430,7 +439,7 @@
|
|
|
430
439
|
},
|
|
431
440
|
},
|
|
432
441
|
},
|
|
433
|
-
})
|
|
442
|
+
});
|
|
434
443
|
```
|
|
435
444
|
|
|
436
445
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -562,12 +571,12 @@
|
|
|
562
571
|
example:
|
|
563
572
|
|
|
564
573
|
```js
|
|
565
|
-
import { defineConfig } from
|
|
574
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
566
575
|
export default defineConfig({
|
|
567
576
|
server: {
|
|
568
|
-
base:
|
|
577
|
+
base: "/dist",
|
|
569
578
|
},
|
|
570
|
-
})
|
|
579
|
+
});
|
|
571
580
|
```
|
|
572
581
|
|
|
573
582
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -620,11 +629,11 @@
|
|
|
620
629
|
You can switch to other tools by using:
|
|
621
630
|
|
|
622
631
|
```js
|
|
623
|
-
import { defineConfig } from
|
|
632
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
624
633
|
import {
|
|
625
634
|
CssMinimizerWebpackPlugin,
|
|
626
635
|
pluginCssMinimizer,
|
|
627
|
-
} from
|
|
636
|
+
} from "@rsbuild/plugin-css-minimizer";
|
|
628
637
|
|
|
629
638
|
export default defineConfig({
|
|
630
639
|
plugins: [
|
|
@@ -637,7 +646,7 @@
|
|
|
637
646
|
},
|
|
638
647
|
}),
|
|
639
648
|
],
|
|
640
|
-
})
|
|
649
|
+
});
|
|
641
650
|
```
|
|
642
651
|
|
|
643
652
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -647,8 +656,8 @@
|
|
|
647
656
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
648
657
|
|
|
649
658
|
```js
|
|
650
|
-
import { defineConfig } from
|
|
651
|
-
import { pluginCssMinimizer } from
|
|
659
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
660
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
652
661
|
|
|
653
662
|
export default defineConfig({
|
|
654
663
|
plugins: [
|
|
@@ -660,7 +669,7 @@
|
|
|
660
669
|
},
|
|
661
670
|
}),
|
|
662
671
|
],
|
|
663
|
-
})
|
|
672
|
+
});
|
|
664
673
|
```
|
|
665
674
|
|
|
666
675
|
## 0.7.1
|
|
@@ -680,7 +689,7 @@
|
|
|
680
689
|
You may turn it off using `output.minify.css: false`:
|
|
681
690
|
|
|
682
691
|
```js
|
|
683
|
-
import { defineConfig } from
|
|
692
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
684
693
|
|
|
685
694
|
export default defineConfig({
|
|
686
695
|
output: {
|
|
@@ -688,18 +697,18 @@
|
|
|
688
697
|
css: false,
|
|
689
698
|
},
|
|
690
699
|
},
|
|
691
|
-
})
|
|
700
|
+
});
|
|
692
701
|
```
|
|
693
702
|
|
|
694
703
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
695
704
|
|
|
696
705
|
```js
|
|
697
|
-
import { defineConfig } from
|
|
698
|
-
import { pluginCssMinimizer } from
|
|
706
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
707
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
699
708
|
|
|
700
709
|
export default defineConfig({
|
|
701
710
|
plugins: [pluginCssMinimizer()],
|
|
702
|
-
})
|
|
711
|
+
});
|
|
703
712
|
```
|
|
704
713
|
|
|
705
714
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -726,22 +735,22 @@
|
|
|
726
735
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
727
736
|
|
|
728
737
|
```js
|
|
729
|
-
import { defineConfig } from
|
|
738
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
730
739
|
|
|
731
740
|
export default defineConfig({
|
|
732
741
|
dev: {
|
|
733
742
|
watchFiles: [
|
|
734
743
|
{
|
|
735
|
-
type:
|
|
736
|
-
paths: [
|
|
744
|
+
type: "reload-server",
|
|
745
|
+
paths: ["public/**/*.txt"],
|
|
737
746
|
},
|
|
738
747
|
{
|
|
739
|
-
type:
|
|
740
|
-
paths: [
|
|
748
|
+
type: "reload-page",
|
|
749
|
+
paths: ["public/**/*.json"],
|
|
741
750
|
},
|
|
742
751
|
],
|
|
743
752
|
},
|
|
744
|
-
})
|
|
753
|
+
});
|
|
745
754
|
```
|
|
746
755
|
|
|
747
756
|
- be9b003: Add `source.exclude`.
|