@lynx-js/rspeedy-canary 0.11.4 → 0.11.5-canary-20250930-8dd1ecb0
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 +60 -54
- package/dist/0~src_config_validate_ts.js +1276 -1215
- package/dist/1~src_config_validate_ts.js +1276 -1215
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
+
## 0.11.5-canary-20250930154600-8dd1ecb0efd2c8d89bca8b37c9822eae84951910
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Bump Rsbuild v1.5.13 with Rspack v1.5.8. ([#1849](https://github.com/lynx-family/lynx-stack/pull/1849))
|
|
8
|
+
|
|
3
9
|
## 0.11.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -31,11 +37,11 @@
|
|
|
31
37
|
- Support `command` and `env` parameters in the function exported by `lynx.config.js`. ([#1669](https://github.com/lynx-family/lynx-stack/pull/1669))
|
|
32
38
|
|
|
33
39
|
```js
|
|
34
|
-
import { defineConfig } from
|
|
40
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
35
41
|
|
|
36
42
|
export default defineConfig(({ command, env }) => {
|
|
37
|
-
const isBuild = command ===
|
|
38
|
-
const isTest = env ===
|
|
43
|
+
const isBuild = command === "build";
|
|
44
|
+
const isTest = env === "test";
|
|
39
45
|
|
|
40
46
|
return {
|
|
41
47
|
output: {
|
|
@@ -44,8 +50,8 @@
|
|
|
44
50
|
performance: {
|
|
45
51
|
buildCache: isBuild,
|
|
46
52
|
},
|
|
47
|
-
}
|
|
48
|
-
})
|
|
53
|
+
};
|
|
54
|
+
});
|
|
49
55
|
```
|
|
50
56
|
|
|
51
57
|
- Support `resolve.dedupe`. ([#1671](https://github.com/lynx-family/lynx-stack/pull/1671))
|
|
@@ -53,30 +59,30 @@
|
|
|
53
59
|
This is useful when having multiple duplicated packages in the bundle:
|
|
54
60
|
|
|
55
61
|
```js
|
|
56
|
-
import { defineConfig } from
|
|
62
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
57
63
|
|
|
58
64
|
export default defineConfig({
|
|
59
65
|
resolve: {
|
|
60
|
-
dedupe: [
|
|
66
|
+
dedupe: ["tslib"],
|
|
61
67
|
},
|
|
62
|
-
})
|
|
68
|
+
});
|
|
63
69
|
```
|
|
64
70
|
|
|
65
71
|
- Support `resolve.aliasStrategy` for controlling priority between `tsconfig.json` paths and `resolve.alias` ([#1722](https://github.com/lynx-family/lynx-stack/pull/1722))
|
|
66
72
|
|
|
67
73
|
```js
|
|
68
|
-
import { defineConfig } from
|
|
74
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
69
75
|
|
|
70
76
|
export default defineConfig({
|
|
71
77
|
resolve: {
|
|
72
78
|
alias: {
|
|
73
|
-
|
|
79
|
+
"@": "./src",
|
|
74
80
|
},
|
|
75
81
|
// 'prefer-tsconfig' (default): tsconfig.json paths take priority
|
|
76
82
|
// 'prefer-alias': resolve.alias takes priority
|
|
77
|
-
aliasStrategy:
|
|
83
|
+
aliasStrategy: "prefer-alias",
|
|
78
84
|
},
|
|
79
|
-
})
|
|
85
|
+
});
|
|
80
86
|
```
|
|
81
87
|
|
|
82
88
|
- Bump Rsbuild v1.5.4 with Rspack v1.5.2. ([#1644](https://github.com/lynx-family/lynx-stack/pull/1644))
|
|
@@ -96,7 +102,7 @@
|
|
|
96
102
|
- Add `output.dataUriLimit.*` for fine-grained control of asset inlining. ([#1648](https://github.com/lynx-family/lynx-stack/pull/1648))
|
|
97
103
|
|
|
98
104
|
```js
|
|
99
|
-
import { defineConfig } from
|
|
105
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
100
106
|
|
|
101
107
|
export default defineConfig({
|
|
102
108
|
output: {
|
|
@@ -105,7 +111,7 @@
|
|
|
105
111
|
media: 0,
|
|
106
112
|
},
|
|
107
113
|
},
|
|
108
|
-
})
|
|
114
|
+
});
|
|
109
115
|
```
|
|
110
116
|
|
|
111
117
|
## 0.11.0
|
|
@@ -225,28 +231,28 @@
|
|
|
225
231
|
|
|
226
232
|
```ts
|
|
227
233
|
type InlineChunkTestFunction = (params: {
|
|
228
|
-
size: number
|
|
229
|
-
name: string
|
|
230
|
-
}) => boolean
|
|
234
|
+
size: number;
|
|
235
|
+
name: string;
|
|
236
|
+
}) => boolean;
|
|
231
237
|
|
|
232
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
238
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction;
|
|
233
239
|
|
|
234
240
|
type InlineChunkConfig =
|
|
235
241
|
| boolean
|
|
236
242
|
| InlineChunkTest
|
|
237
|
-
| { enable?: boolean |
|
|
243
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
238
244
|
```
|
|
239
245
|
|
|
240
246
|
```ts
|
|
241
|
-
import { defineConfig } from
|
|
247
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
242
248
|
|
|
243
249
|
export default defineConfig({
|
|
244
250
|
output: {
|
|
245
251
|
inlineScripts: ({ name, size }) => {
|
|
246
|
-
return name.includes(
|
|
252
|
+
return name.includes("foo") && size < 1000;
|
|
247
253
|
},
|
|
248
254
|
},
|
|
249
|
-
})
|
|
255
|
+
});
|
|
250
256
|
```
|
|
251
257
|
|
|
252
258
|
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
@@ -289,13 +295,13 @@
|
|
|
289
295
|
example:
|
|
290
296
|
|
|
291
297
|
```js
|
|
292
|
-
import { defineConfig } from
|
|
298
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
293
299
|
|
|
294
300
|
export default defineConfig({
|
|
295
301
|
output: {
|
|
296
302
|
inlineScripts: false,
|
|
297
303
|
},
|
|
298
|
-
})
|
|
304
|
+
});
|
|
299
305
|
```
|
|
300
306
|
|
|
301
307
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -315,12 +321,12 @@
|
|
|
315
321
|
example:
|
|
316
322
|
|
|
317
323
|
```js
|
|
318
|
-
import { defineConfig } from
|
|
324
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
319
325
|
export default defineConfig({
|
|
320
326
|
source: {
|
|
321
|
-
preEntry:
|
|
327
|
+
preEntry: "./src/polyfill.ts",
|
|
322
328
|
},
|
|
323
|
-
})
|
|
329
|
+
});
|
|
324
330
|
```
|
|
325
331
|
|
|
326
332
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -331,17 +337,17 @@
|
|
|
331
337
|
|
|
332
338
|
```js
|
|
333
339
|
export const myPlugin = {
|
|
334
|
-
name:
|
|
340
|
+
name: "my-plugin",
|
|
335
341
|
setup(api) {
|
|
336
|
-
const { callerName } = api.context
|
|
342
|
+
const { callerName } = api.context;
|
|
337
343
|
|
|
338
|
-
if (callerName ===
|
|
344
|
+
if (callerName === "rslib") {
|
|
339
345
|
// ...
|
|
340
|
-
} else if (callerName ===
|
|
346
|
+
} else if (callerName === "rspeedy") {
|
|
341
347
|
// ...
|
|
342
348
|
}
|
|
343
349
|
},
|
|
344
|
-
}
|
|
350
|
+
};
|
|
345
351
|
```
|
|
346
352
|
|
|
347
353
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -364,7 +370,7 @@
|
|
|
364
370
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
365
371
|
|
|
366
372
|
```js
|
|
367
|
-
import { defineConfig } from
|
|
373
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
368
374
|
|
|
369
375
|
export default defineConfig({
|
|
370
376
|
tools: {
|
|
@@ -374,7 +380,7 @@
|
|
|
374
380
|
},
|
|
375
381
|
},
|
|
376
382
|
},
|
|
377
|
-
})
|
|
383
|
+
});
|
|
378
384
|
```
|
|
379
385
|
|
|
380
386
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -506,12 +512,12 @@
|
|
|
506
512
|
example:
|
|
507
513
|
|
|
508
514
|
```js
|
|
509
|
-
import { defineConfig } from
|
|
515
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
510
516
|
export default defineConfig({
|
|
511
517
|
server: {
|
|
512
|
-
base:
|
|
518
|
+
base: "/dist",
|
|
513
519
|
},
|
|
514
|
-
})
|
|
520
|
+
});
|
|
515
521
|
```
|
|
516
522
|
|
|
517
523
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -564,11 +570,11 @@
|
|
|
564
570
|
You can switch to other tools by using:
|
|
565
571
|
|
|
566
572
|
```js
|
|
567
|
-
import { defineConfig } from
|
|
573
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
568
574
|
import {
|
|
569
575
|
CssMinimizerWebpackPlugin,
|
|
570
576
|
pluginCssMinimizer,
|
|
571
|
-
} from
|
|
577
|
+
} from "@rsbuild/plugin-css-minimizer";
|
|
572
578
|
|
|
573
579
|
export default defineConfig({
|
|
574
580
|
plugins: [
|
|
@@ -581,7 +587,7 @@
|
|
|
581
587
|
},
|
|
582
588
|
}),
|
|
583
589
|
],
|
|
584
|
-
})
|
|
590
|
+
});
|
|
585
591
|
```
|
|
586
592
|
|
|
587
593
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -591,8 +597,8 @@
|
|
|
591
597
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
592
598
|
|
|
593
599
|
```js
|
|
594
|
-
import { defineConfig } from
|
|
595
|
-
import { pluginCssMinimizer } from
|
|
600
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
601
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
596
602
|
|
|
597
603
|
export default defineConfig({
|
|
598
604
|
plugins: [
|
|
@@ -604,7 +610,7 @@
|
|
|
604
610
|
},
|
|
605
611
|
}),
|
|
606
612
|
],
|
|
607
|
-
})
|
|
613
|
+
});
|
|
608
614
|
```
|
|
609
615
|
|
|
610
616
|
## 0.7.1
|
|
@@ -624,7 +630,7 @@
|
|
|
624
630
|
You may turn it off using `output.minify.css: false`:
|
|
625
631
|
|
|
626
632
|
```js
|
|
627
|
-
import { defineConfig } from
|
|
633
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
628
634
|
|
|
629
635
|
export default defineConfig({
|
|
630
636
|
output: {
|
|
@@ -632,18 +638,18 @@
|
|
|
632
638
|
css: false,
|
|
633
639
|
},
|
|
634
640
|
},
|
|
635
|
-
})
|
|
641
|
+
});
|
|
636
642
|
```
|
|
637
643
|
|
|
638
644
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
639
645
|
|
|
640
646
|
```js
|
|
641
|
-
import { defineConfig } from
|
|
642
|
-
import { pluginCssMinimizer } from
|
|
647
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
648
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
643
649
|
|
|
644
650
|
export default defineConfig({
|
|
645
651
|
plugins: [pluginCssMinimizer()],
|
|
646
|
-
})
|
|
652
|
+
});
|
|
647
653
|
```
|
|
648
654
|
|
|
649
655
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -670,22 +676,22 @@
|
|
|
670
676
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
671
677
|
|
|
672
678
|
```js
|
|
673
|
-
import { defineConfig } from
|
|
679
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
674
680
|
|
|
675
681
|
export default defineConfig({
|
|
676
682
|
dev: {
|
|
677
683
|
watchFiles: [
|
|
678
684
|
{
|
|
679
|
-
type:
|
|
680
|
-
paths: [
|
|
685
|
+
type: "reload-server",
|
|
686
|
+
paths: ["public/**/*.txt"],
|
|
681
687
|
},
|
|
682
688
|
{
|
|
683
|
-
type:
|
|
684
|
-
paths: [
|
|
689
|
+
type: "reload-page",
|
|
690
|
+
paths: ["public/**/*.json"],
|
|
685
691
|
},
|
|
686
692
|
],
|
|
687
693
|
},
|
|
688
|
-
})
|
|
694
|
+
});
|
|
689
695
|
```
|
|
690
696
|
|
|
691
697
|
- be9b003: Add `source.exclude`.
|