@lynx-js/rspeedy-canary 0.12.3 → 0.12.4-canary-20251224-a26be78a
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 +61 -54
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
+
## 0.12.4-canary-20251224033157-a26be78a7918c8dbf4a8446a82a75901b77bd5e7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @lynx-js/web-rsbuild-server-middleware@0.19.3-canary-20251224033157-a26be78a7918c8dbf4a8446a82a75901b77bd5e7
|
|
9
|
+
|
|
3
10
|
## 0.12.3
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -114,11 +121,11 @@
|
|
|
114
121
|
- Support `command` and `env` parameters in the function exported by `lynx.config.js`. ([#1669](https://github.com/lynx-family/lynx-stack/pull/1669))
|
|
115
122
|
|
|
116
123
|
```js
|
|
117
|
-
import { defineConfig } from
|
|
124
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
118
125
|
|
|
119
126
|
export default defineConfig(({ command, env }) => {
|
|
120
|
-
const isBuild = command ===
|
|
121
|
-
const isTest = env ===
|
|
127
|
+
const isBuild = command === "build";
|
|
128
|
+
const isTest = env === "test";
|
|
122
129
|
|
|
123
130
|
return {
|
|
124
131
|
output: {
|
|
@@ -127,8 +134,8 @@
|
|
|
127
134
|
performance: {
|
|
128
135
|
buildCache: isBuild,
|
|
129
136
|
},
|
|
130
|
-
}
|
|
131
|
-
})
|
|
137
|
+
};
|
|
138
|
+
});
|
|
132
139
|
```
|
|
133
140
|
|
|
134
141
|
- Support `resolve.dedupe`. ([#1671](https://github.com/lynx-family/lynx-stack/pull/1671))
|
|
@@ -136,30 +143,30 @@
|
|
|
136
143
|
This is useful when having multiple duplicated packages in the bundle:
|
|
137
144
|
|
|
138
145
|
```js
|
|
139
|
-
import { defineConfig } from
|
|
146
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
140
147
|
|
|
141
148
|
export default defineConfig({
|
|
142
149
|
resolve: {
|
|
143
|
-
dedupe: [
|
|
150
|
+
dedupe: ["tslib"],
|
|
144
151
|
},
|
|
145
|
-
})
|
|
152
|
+
});
|
|
146
153
|
```
|
|
147
154
|
|
|
148
155
|
- Support `resolve.aliasStrategy` for controlling priority between `tsconfig.json` paths and `resolve.alias` ([#1722](https://github.com/lynx-family/lynx-stack/pull/1722))
|
|
149
156
|
|
|
150
157
|
```js
|
|
151
|
-
import { defineConfig } from
|
|
158
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
152
159
|
|
|
153
160
|
export default defineConfig({
|
|
154
161
|
resolve: {
|
|
155
162
|
alias: {
|
|
156
|
-
|
|
163
|
+
"@": "./src",
|
|
157
164
|
},
|
|
158
165
|
// 'prefer-tsconfig' (default): tsconfig.json paths take priority
|
|
159
166
|
// 'prefer-alias': resolve.alias takes priority
|
|
160
|
-
aliasStrategy:
|
|
167
|
+
aliasStrategy: "prefer-alias",
|
|
161
168
|
},
|
|
162
|
-
})
|
|
169
|
+
});
|
|
163
170
|
```
|
|
164
171
|
|
|
165
172
|
- Bump Rsbuild v1.5.4 with Rspack v1.5.2. ([#1644](https://github.com/lynx-family/lynx-stack/pull/1644))
|
|
@@ -179,7 +186,7 @@
|
|
|
179
186
|
- Add `output.dataUriLimit.*` for fine-grained control of asset inlining. ([#1648](https://github.com/lynx-family/lynx-stack/pull/1648))
|
|
180
187
|
|
|
181
188
|
```js
|
|
182
|
-
import { defineConfig } from
|
|
189
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
183
190
|
|
|
184
191
|
export default defineConfig({
|
|
185
192
|
output: {
|
|
@@ -188,7 +195,7 @@
|
|
|
188
195
|
media: 0,
|
|
189
196
|
},
|
|
190
197
|
},
|
|
191
|
-
})
|
|
198
|
+
});
|
|
192
199
|
```
|
|
193
200
|
|
|
194
201
|
## 0.11.0
|
|
@@ -308,28 +315,28 @@
|
|
|
308
315
|
|
|
309
316
|
```ts
|
|
310
317
|
type InlineChunkTestFunction = (params: {
|
|
311
|
-
size: number
|
|
312
|
-
name: string
|
|
313
|
-
}) => boolean
|
|
318
|
+
size: number;
|
|
319
|
+
name: string;
|
|
320
|
+
}) => boolean;
|
|
314
321
|
|
|
315
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
322
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction;
|
|
316
323
|
|
|
317
324
|
type InlineChunkConfig =
|
|
318
325
|
| boolean
|
|
319
326
|
| InlineChunkTest
|
|
320
|
-
| { enable?: boolean |
|
|
327
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
321
328
|
```
|
|
322
329
|
|
|
323
330
|
```ts
|
|
324
|
-
import { defineConfig } from
|
|
331
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
325
332
|
|
|
326
333
|
export default defineConfig({
|
|
327
334
|
output: {
|
|
328
335
|
inlineScripts: ({ name, size }) => {
|
|
329
|
-
return name.includes(
|
|
336
|
+
return name.includes("foo") && size < 1000;
|
|
330
337
|
},
|
|
331
338
|
},
|
|
332
|
-
})
|
|
339
|
+
});
|
|
333
340
|
```
|
|
334
341
|
|
|
335
342
|
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
@@ -372,13 +379,13 @@
|
|
|
372
379
|
example:
|
|
373
380
|
|
|
374
381
|
```js
|
|
375
|
-
import { defineConfig } from
|
|
382
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
376
383
|
|
|
377
384
|
export default defineConfig({
|
|
378
385
|
output: {
|
|
379
386
|
inlineScripts: false,
|
|
380
387
|
},
|
|
381
|
-
})
|
|
388
|
+
});
|
|
382
389
|
```
|
|
383
390
|
|
|
384
391
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -398,12 +405,12 @@
|
|
|
398
405
|
example:
|
|
399
406
|
|
|
400
407
|
```js
|
|
401
|
-
import { defineConfig } from
|
|
408
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
402
409
|
export default defineConfig({
|
|
403
410
|
source: {
|
|
404
|
-
preEntry:
|
|
411
|
+
preEntry: "./src/polyfill.ts",
|
|
405
412
|
},
|
|
406
|
-
})
|
|
413
|
+
});
|
|
407
414
|
```
|
|
408
415
|
|
|
409
416
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -414,17 +421,17 @@
|
|
|
414
421
|
|
|
415
422
|
```js
|
|
416
423
|
export const myPlugin = {
|
|
417
|
-
name:
|
|
424
|
+
name: "my-plugin",
|
|
418
425
|
setup(api) {
|
|
419
|
-
const { callerName } = api.context
|
|
426
|
+
const { callerName } = api.context;
|
|
420
427
|
|
|
421
|
-
if (callerName ===
|
|
428
|
+
if (callerName === "rslib") {
|
|
422
429
|
// ...
|
|
423
|
-
} else if (callerName ===
|
|
430
|
+
} else if (callerName === "rspeedy") {
|
|
424
431
|
// ...
|
|
425
432
|
}
|
|
426
433
|
},
|
|
427
|
-
}
|
|
434
|
+
};
|
|
428
435
|
```
|
|
429
436
|
|
|
430
437
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -447,7 +454,7 @@
|
|
|
447
454
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
448
455
|
|
|
449
456
|
```js
|
|
450
|
-
import { defineConfig } from
|
|
457
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
451
458
|
|
|
452
459
|
export default defineConfig({
|
|
453
460
|
tools: {
|
|
@@ -457,7 +464,7 @@
|
|
|
457
464
|
},
|
|
458
465
|
},
|
|
459
466
|
},
|
|
460
|
-
})
|
|
467
|
+
});
|
|
461
468
|
```
|
|
462
469
|
|
|
463
470
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -589,12 +596,12 @@
|
|
|
589
596
|
example:
|
|
590
597
|
|
|
591
598
|
```js
|
|
592
|
-
import { defineConfig } from
|
|
599
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
593
600
|
export default defineConfig({
|
|
594
601
|
server: {
|
|
595
|
-
base:
|
|
602
|
+
base: "/dist",
|
|
596
603
|
},
|
|
597
|
-
})
|
|
604
|
+
});
|
|
598
605
|
```
|
|
599
606
|
|
|
600
607
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -647,11 +654,11 @@
|
|
|
647
654
|
You can switch to other tools by using:
|
|
648
655
|
|
|
649
656
|
```js
|
|
650
|
-
import { defineConfig } from
|
|
657
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
651
658
|
import {
|
|
652
659
|
CssMinimizerWebpackPlugin,
|
|
653
660
|
pluginCssMinimizer,
|
|
654
|
-
} from
|
|
661
|
+
} from "@rsbuild/plugin-css-minimizer";
|
|
655
662
|
|
|
656
663
|
export default defineConfig({
|
|
657
664
|
plugins: [
|
|
@@ -664,7 +671,7 @@
|
|
|
664
671
|
},
|
|
665
672
|
}),
|
|
666
673
|
],
|
|
667
|
-
})
|
|
674
|
+
});
|
|
668
675
|
```
|
|
669
676
|
|
|
670
677
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -674,8 +681,8 @@
|
|
|
674
681
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
675
682
|
|
|
676
683
|
```js
|
|
677
|
-
import { defineConfig } from
|
|
678
|
-
import { pluginCssMinimizer } from
|
|
684
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
685
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
679
686
|
|
|
680
687
|
export default defineConfig({
|
|
681
688
|
plugins: [
|
|
@@ -687,7 +694,7 @@
|
|
|
687
694
|
},
|
|
688
695
|
}),
|
|
689
696
|
],
|
|
690
|
-
})
|
|
697
|
+
});
|
|
691
698
|
```
|
|
692
699
|
|
|
693
700
|
## 0.7.1
|
|
@@ -707,7 +714,7 @@
|
|
|
707
714
|
You may turn it off using `output.minify.css: false`:
|
|
708
715
|
|
|
709
716
|
```js
|
|
710
|
-
import { defineConfig } from
|
|
717
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
711
718
|
|
|
712
719
|
export default defineConfig({
|
|
713
720
|
output: {
|
|
@@ -715,18 +722,18 @@
|
|
|
715
722
|
css: false,
|
|
716
723
|
},
|
|
717
724
|
},
|
|
718
|
-
})
|
|
725
|
+
});
|
|
719
726
|
```
|
|
720
727
|
|
|
721
728
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
722
729
|
|
|
723
730
|
```js
|
|
724
|
-
import { defineConfig } from
|
|
725
|
-
import { pluginCssMinimizer } from
|
|
731
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
732
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
726
733
|
|
|
727
734
|
export default defineConfig({
|
|
728
735
|
plugins: [pluginCssMinimizer()],
|
|
729
|
-
})
|
|
736
|
+
});
|
|
730
737
|
```
|
|
731
738
|
|
|
732
739
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -753,22 +760,22 @@
|
|
|
753
760
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
754
761
|
|
|
755
762
|
```js
|
|
756
|
-
import { defineConfig } from
|
|
763
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
757
764
|
|
|
758
765
|
export default defineConfig({
|
|
759
766
|
dev: {
|
|
760
767
|
watchFiles: [
|
|
761
768
|
{
|
|
762
|
-
type:
|
|
763
|
-
paths: [
|
|
769
|
+
type: "reload-server",
|
|
770
|
+
paths: ["public/**/*.txt"],
|
|
764
771
|
},
|
|
765
772
|
{
|
|
766
|
-
type:
|
|
767
|
-
paths: [
|
|
773
|
+
type: "reload-page",
|
|
774
|
+
paths: ["public/**/*.json"],
|
|
768
775
|
},
|
|
769
776
|
],
|
|
770
777
|
},
|
|
771
|
-
})
|
|
778
|
+
});
|
|
772
779
|
```
|
|
773
780
|
|
|
774
781
|
- be9b003: Add `source.exclude`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/rspeedy-canary",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.4-canary-20251224-a26be78a",
|
|
4
4
|
"description": "A webpack/rspack-based frontend toolchain for Lynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@lynx-js/cache-events-webpack-plugin": "npm:@lynx-js/cache-events-webpack-plugin-canary@0.0.2",
|
|
52
52
|
"@lynx-js/chunk-loading-webpack-plugin": "npm:@lynx-js/chunk-loading-webpack-plugin-canary@0.3.3",
|
|
53
|
-
"@lynx-js/web-rsbuild-server-middleware": "npm:@lynx-js/web-rsbuild-server-middleware-canary@0.19.
|
|
53
|
+
"@lynx-js/web-rsbuild-server-middleware": "npm:@lynx-js/web-rsbuild-server-middleware-canary@0.19.3-canary-20251224-a26be78a",
|
|
54
54
|
"@lynx-js/webpack-dev-transport": "npm:@lynx-js/webpack-dev-transport-canary@0.2.0",
|
|
55
55
|
"@lynx-js/websocket": "npm:@lynx-js/websocket-canary@0.0.4",
|
|
56
56
|
"@rsbuild/core": "1.6.13",
|