@lynx-js/rspeedy-canary 0.12.5 → 0.13.0-canary-20260105-8aa343cd
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 +3076 -3024
- package/dist/1~src_config_validate_ts.js +3076 -3024
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
+
## 0.13.0-canary-20260105043656-8aa343cdcc79d3a96b0da43712b779264b23b02e
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Bump Rsbuild v1.7.1 with Rspack v1.7.0. ([#2088](https://github.com/lynx-family/lynx-stack/pull/2088))
|
|
8
|
+
|
|
3
9
|
## 0.12.5
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -128,11 +134,11 @@
|
|
|
128
134
|
- Support `command` and `env` parameters in the function exported by `lynx.config.js`. ([#1669](https://github.com/lynx-family/lynx-stack/pull/1669))
|
|
129
135
|
|
|
130
136
|
```js
|
|
131
|
-
import { defineConfig } from
|
|
137
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
132
138
|
|
|
133
139
|
export default defineConfig(({ command, env }) => {
|
|
134
|
-
const isBuild = command ===
|
|
135
|
-
const isTest = env ===
|
|
140
|
+
const isBuild = command === "build";
|
|
141
|
+
const isTest = env === "test";
|
|
136
142
|
|
|
137
143
|
return {
|
|
138
144
|
output: {
|
|
@@ -141,8 +147,8 @@
|
|
|
141
147
|
performance: {
|
|
142
148
|
buildCache: isBuild,
|
|
143
149
|
},
|
|
144
|
-
}
|
|
145
|
-
})
|
|
150
|
+
};
|
|
151
|
+
});
|
|
146
152
|
```
|
|
147
153
|
|
|
148
154
|
- Support `resolve.dedupe`. ([#1671](https://github.com/lynx-family/lynx-stack/pull/1671))
|
|
@@ -150,30 +156,30 @@
|
|
|
150
156
|
This is useful when having multiple duplicated packages in the bundle:
|
|
151
157
|
|
|
152
158
|
```js
|
|
153
|
-
import { defineConfig } from
|
|
159
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
154
160
|
|
|
155
161
|
export default defineConfig({
|
|
156
162
|
resolve: {
|
|
157
|
-
dedupe: [
|
|
163
|
+
dedupe: ["tslib"],
|
|
158
164
|
},
|
|
159
|
-
})
|
|
165
|
+
});
|
|
160
166
|
```
|
|
161
167
|
|
|
162
168
|
- Support `resolve.aliasStrategy` for controlling priority between `tsconfig.json` paths and `resolve.alias` ([#1722](https://github.com/lynx-family/lynx-stack/pull/1722))
|
|
163
169
|
|
|
164
170
|
```js
|
|
165
|
-
import { defineConfig } from
|
|
171
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
166
172
|
|
|
167
173
|
export default defineConfig({
|
|
168
174
|
resolve: {
|
|
169
175
|
alias: {
|
|
170
|
-
|
|
176
|
+
"@": "./src",
|
|
171
177
|
},
|
|
172
178
|
// 'prefer-tsconfig' (default): tsconfig.json paths take priority
|
|
173
179
|
// 'prefer-alias': resolve.alias takes priority
|
|
174
|
-
aliasStrategy:
|
|
180
|
+
aliasStrategy: "prefer-alias",
|
|
175
181
|
},
|
|
176
|
-
})
|
|
182
|
+
});
|
|
177
183
|
```
|
|
178
184
|
|
|
179
185
|
- Bump Rsbuild v1.5.4 with Rspack v1.5.2. ([#1644](https://github.com/lynx-family/lynx-stack/pull/1644))
|
|
@@ -193,7 +199,7 @@
|
|
|
193
199
|
- Add `output.dataUriLimit.*` for fine-grained control of asset inlining. ([#1648](https://github.com/lynx-family/lynx-stack/pull/1648))
|
|
194
200
|
|
|
195
201
|
```js
|
|
196
|
-
import { defineConfig } from
|
|
202
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
197
203
|
|
|
198
204
|
export default defineConfig({
|
|
199
205
|
output: {
|
|
@@ -202,7 +208,7 @@
|
|
|
202
208
|
media: 0,
|
|
203
209
|
},
|
|
204
210
|
},
|
|
205
|
-
})
|
|
211
|
+
});
|
|
206
212
|
```
|
|
207
213
|
|
|
208
214
|
## 0.11.0
|
|
@@ -322,28 +328,28 @@
|
|
|
322
328
|
|
|
323
329
|
```ts
|
|
324
330
|
type InlineChunkTestFunction = (params: {
|
|
325
|
-
size: number
|
|
326
|
-
name: string
|
|
327
|
-
}) => boolean
|
|
331
|
+
size: number;
|
|
332
|
+
name: string;
|
|
333
|
+
}) => boolean;
|
|
328
334
|
|
|
329
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
335
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction;
|
|
330
336
|
|
|
331
337
|
type InlineChunkConfig =
|
|
332
338
|
| boolean
|
|
333
339
|
| InlineChunkTest
|
|
334
|
-
| { enable?: boolean |
|
|
340
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
335
341
|
```
|
|
336
342
|
|
|
337
343
|
```ts
|
|
338
|
-
import { defineConfig } from
|
|
344
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
339
345
|
|
|
340
346
|
export default defineConfig({
|
|
341
347
|
output: {
|
|
342
348
|
inlineScripts: ({ name, size }) => {
|
|
343
|
-
return name.includes(
|
|
349
|
+
return name.includes("foo") && size < 1000;
|
|
344
350
|
},
|
|
345
351
|
},
|
|
346
|
-
})
|
|
352
|
+
});
|
|
347
353
|
```
|
|
348
354
|
|
|
349
355
|
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
@@ -386,13 +392,13 @@
|
|
|
386
392
|
example:
|
|
387
393
|
|
|
388
394
|
```js
|
|
389
|
-
import { defineConfig } from
|
|
395
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
390
396
|
|
|
391
397
|
export default defineConfig({
|
|
392
398
|
output: {
|
|
393
399
|
inlineScripts: false,
|
|
394
400
|
},
|
|
395
|
-
})
|
|
401
|
+
});
|
|
396
402
|
```
|
|
397
403
|
|
|
398
404
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -412,12 +418,12 @@
|
|
|
412
418
|
example:
|
|
413
419
|
|
|
414
420
|
```js
|
|
415
|
-
import { defineConfig } from
|
|
421
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
416
422
|
export default defineConfig({
|
|
417
423
|
source: {
|
|
418
|
-
preEntry:
|
|
424
|
+
preEntry: "./src/polyfill.ts",
|
|
419
425
|
},
|
|
420
|
-
})
|
|
426
|
+
});
|
|
421
427
|
```
|
|
422
428
|
|
|
423
429
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -428,17 +434,17 @@
|
|
|
428
434
|
|
|
429
435
|
```js
|
|
430
436
|
export const myPlugin = {
|
|
431
|
-
name:
|
|
437
|
+
name: "my-plugin",
|
|
432
438
|
setup(api) {
|
|
433
|
-
const { callerName } = api.context
|
|
439
|
+
const { callerName } = api.context;
|
|
434
440
|
|
|
435
|
-
if (callerName ===
|
|
441
|
+
if (callerName === "rslib") {
|
|
436
442
|
// ...
|
|
437
|
-
} else if (callerName ===
|
|
443
|
+
} else if (callerName === "rspeedy") {
|
|
438
444
|
// ...
|
|
439
445
|
}
|
|
440
446
|
},
|
|
441
|
-
}
|
|
447
|
+
};
|
|
442
448
|
```
|
|
443
449
|
|
|
444
450
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -461,7 +467,7 @@
|
|
|
461
467
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
462
468
|
|
|
463
469
|
```js
|
|
464
|
-
import { defineConfig } from
|
|
470
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
465
471
|
|
|
466
472
|
export default defineConfig({
|
|
467
473
|
tools: {
|
|
@@ -471,7 +477,7 @@
|
|
|
471
477
|
},
|
|
472
478
|
},
|
|
473
479
|
},
|
|
474
|
-
})
|
|
480
|
+
});
|
|
475
481
|
```
|
|
476
482
|
|
|
477
483
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -603,12 +609,12 @@
|
|
|
603
609
|
example:
|
|
604
610
|
|
|
605
611
|
```js
|
|
606
|
-
import { defineConfig } from
|
|
612
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
607
613
|
export default defineConfig({
|
|
608
614
|
server: {
|
|
609
|
-
base:
|
|
615
|
+
base: "/dist",
|
|
610
616
|
},
|
|
611
|
-
})
|
|
617
|
+
});
|
|
612
618
|
```
|
|
613
619
|
|
|
614
620
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -661,11 +667,11 @@
|
|
|
661
667
|
You can switch to other tools by using:
|
|
662
668
|
|
|
663
669
|
```js
|
|
664
|
-
import { defineConfig } from
|
|
670
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
665
671
|
import {
|
|
666
672
|
CssMinimizerWebpackPlugin,
|
|
667
673
|
pluginCssMinimizer,
|
|
668
|
-
} from
|
|
674
|
+
} from "@rsbuild/plugin-css-minimizer";
|
|
669
675
|
|
|
670
676
|
export default defineConfig({
|
|
671
677
|
plugins: [
|
|
@@ -678,7 +684,7 @@
|
|
|
678
684
|
},
|
|
679
685
|
}),
|
|
680
686
|
],
|
|
681
|
-
})
|
|
687
|
+
});
|
|
682
688
|
```
|
|
683
689
|
|
|
684
690
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -688,8 +694,8 @@
|
|
|
688
694
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
689
695
|
|
|
690
696
|
```js
|
|
691
|
-
import { defineConfig } from
|
|
692
|
-
import { pluginCssMinimizer } from
|
|
697
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
698
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
693
699
|
|
|
694
700
|
export default defineConfig({
|
|
695
701
|
plugins: [
|
|
@@ -701,7 +707,7 @@
|
|
|
701
707
|
},
|
|
702
708
|
}),
|
|
703
709
|
],
|
|
704
|
-
})
|
|
710
|
+
});
|
|
705
711
|
```
|
|
706
712
|
|
|
707
713
|
## 0.7.1
|
|
@@ -721,7 +727,7 @@
|
|
|
721
727
|
You may turn it off using `output.minify.css: false`:
|
|
722
728
|
|
|
723
729
|
```js
|
|
724
|
-
import { defineConfig } from
|
|
730
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
725
731
|
|
|
726
732
|
export default defineConfig({
|
|
727
733
|
output: {
|
|
@@ -729,18 +735,18 @@
|
|
|
729
735
|
css: false,
|
|
730
736
|
},
|
|
731
737
|
},
|
|
732
|
-
})
|
|
738
|
+
});
|
|
733
739
|
```
|
|
734
740
|
|
|
735
741
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
736
742
|
|
|
737
743
|
```js
|
|
738
|
-
import { defineConfig } from
|
|
739
|
-
import { pluginCssMinimizer } from
|
|
744
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
745
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
740
746
|
|
|
741
747
|
export default defineConfig({
|
|
742
748
|
plugins: [pluginCssMinimizer()],
|
|
743
|
-
})
|
|
749
|
+
});
|
|
744
750
|
```
|
|
745
751
|
|
|
746
752
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -767,22 +773,22 @@
|
|
|
767
773
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
768
774
|
|
|
769
775
|
```js
|
|
770
|
-
import { defineConfig } from
|
|
776
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
771
777
|
|
|
772
778
|
export default defineConfig({
|
|
773
779
|
dev: {
|
|
774
780
|
watchFiles: [
|
|
775
781
|
{
|
|
776
|
-
type:
|
|
777
|
-
paths: [
|
|
782
|
+
type: "reload-server",
|
|
783
|
+
paths: ["public/**/*.txt"],
|
|
778
784
|
},
|
|
779
785
|
{
|
|
780
|
-
type:
|
|
781
|
-
paths: [
|
|
786
|
+
type: "reload-page",
|
|
787
|
+
paths: ["public/**/*.json"],
|
|
782
788
|
},
|
|
783
789
|
],
|
|
784
790
|
},
|
|
785
|
-
})
|
|
791
|
+
});
|
|
786
792
|
```
|
|
787
793
|
|
|
788
794
|
- be9b003: Add `source.exclude`.
|