@lynx-js/rspeedy-canary 0.11.9 → 0.11.10-canary-20251111-da466b23
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.11.10-canary-20251111092024-da466b23b732a6599ad9ad454bd08e881dda1302
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @lynx-js/web-rsbuild-server-middleware@0.18.4-canary-20251111092024-da466b23b732a6599ad9ad454bd08e881dda1302
|
|
9
|
+
|
|
3
10
|
## 0.11.9
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -76,11 +83,11 @@
|
|
|
76
83
|
- Support `command` and `env` parameters in the function exported by `lynx.config.js`. ([#1669](https://github.com/lynx-family/lynx-stack/pull/1669))
|
|
77
84
|
|
|
78
85
|
```js
|
|
79
|
-
import { defineConfig } from
|
|
86
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
80
87
|
|
|
81
88
|
export default defineConfig(({ command, env }) => {
|
|
82
|
-
const isBuild = command ===
|
|
83
|
-
const isTest = env ===
|
|
89
|
+
const isBuild = command === "build";
|
|
90
|
+
const isTest = env === "test";
|
|
84
91
|
|
|
85
92
|
return {
|
|
86
93
|
output: {
|
|
@@ -89,8 +96,8 @@
|
|
|
89
96
|
performance: {
|
|
90
97
|
buildCache: isBuild,
|
|
91
98
|
},
|
|
92
|
-
}
|
|
93
|
-
})
|
|
99
|
+
};
|
|
100
|
+
});
|
|
94
101
|
```
|
|
95
102
|
|
|
96
103
|
- Support `resolve.dedupe`. ([#1671](https://github.com/lynx-family/lynx-stack/pull/1671))
|
|
@@ -98,30 +105,30 @@
|
|
|
98
105
|
This is useful when having multiple duplicated packages in the bundle:
|
|
99
106
|
|
|
100
107
|
```js
|
|
101
|
-
import { defineConfig } from
|
|
108
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
102
109
|
|
|
103
110
|
export default defineConfig({
|
|
104
111
|
resolve: {
|
|
105
|
-
dedupe: [
|
|
112
|
+
dedupe: ["tslib"],
|
|
106
113
|
},
|
|
107
|
-
})
|
|
114
|
+
});
|
|
108
115
|
```
|
|
109
116
|
|
|
110
117
|
- Support `resolve.aliasStrategy` for controlling priority between `tsconfig.json` paths and `resolve.alias` ([#1722](https://github.com/lynx-family/lynx-stack/pull/1722))
|
|
111
118
|
|
|
112
119
|
```js
|
|
113
|
-
import { defineConfig } from
|
|
120
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
114
121
|
|
|
115
122
|
export default defineConfig({
|
|
116
123
|
resolve: {
|
|
117
124
|
alias: {
|
|
118
|
-
|
|
125
|
+
"@": "./src",
|
|
119
126
|
},
|
|
120
127
|
// 'prefer-tsconfig' (default): tsconfig.json paths take priority
|
|
121
128
|
// 'prefer-alias': resolve.alias takes priority
|
|
122
|
-
aliasStrategy:
|
|
129
|
+
aliasStrategy: "prefer-alias",
|
|
123
130
|
},
|
|
124
|
-
})
|
|
131
|
+
});
|
|
125
132
|
```
|
|
126
133
|
|
|
127
134
|
- Bump Rsbuild v1.5.4 with Rspack v1.5.2. ([#1644](https://github.com/lynx-family/lynx-stack/pull/1644))
|
|
@@ -141,7 +148,7 @@
|
|
|
141
148
|
- Add `output.dataUriLimit.*` for fine-grained control of asset inlining. ([#1648](https://github.com/lynx-family/lynx-stack/pull/1648))
|
|
142
149
|
|
|
143
150
|
```js
|
|
144
|
-
import { defineConfig } from
|
|
151
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
145
152
|
|
|
146
153
|
export default defineConfig({
|
|
147
154
|
output: {
|
|
@@ -150,7 +157,7 @@
|
|
|
150
157
|
media: 0,
|
|
151
158
|
},
|
|
152
159
|
},
|
|
153
|
-
})
|
|
160
|
+
});
|
|
154
161
|
```
|
|
155
162
|
|
|
156
163
|
## 0.11.0
|
|
@@ -270,28 +277,28 @@
|
|
|
270
277
|
|
|
271
278
|
```ts
|
|
272
279
|
type InlineChunkTestFunction = (params: {
|
|
273
|
-
size: number
|
|
274
|
-
name: string
|
|
275
|
-
}) => boolean
|
|
280
|
+
size: number;
|
|
281
|
+
name: string;
|
|
282
|
+
}) => boolean;
|
|
276
283
|
|
|
277
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
284
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction;
|
|
278
285
|
|
|
279
286
|
type InlineChunkConfig =
|
|
280
287
|
| boolean
|
|
281
288
|
| InlineChunkTest
|
|
282
|
-
| { enable?: boolean |
|
|
289
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
283
290
|
```
|
|
284
291
|
|
|
285
292
|
```ts
|
|
286
|
-
import { defineConfig } from
|
|
293
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
287
294
|
|
|
288
295
|
export default defineConfig({
|
|
289
296
|
output: {
|
|
290
297
|
inlineScripts: ({ name, size }) => {
|
|
291
|
-
return name.includes(
|
|
298
|
+
return name.includes("foo") && size < 1000;
|
|
292
299
|
},
|
|
293
300
|
},
|
|
294
|
-
})
|
|
301
|
+
});
|
|
295
302
|
```
|
|
296
303
|
|
|
297
304
|
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
@@ -334,13 +341,13 @@
|
|
|
334
341
|
example:
|
|
335
342
|
|
|
336
343
|
```js
|
|
337
|
-
import { defineConfig } from
|
|
344
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
338
345
|
|
|
339
346
|
export default defineConfig({
|
|
340
347
|
output: {
|
|
341
348
|
inlineScripts: false,
|
|
342
349
|
},
|
|
343
|
-
})
|
|
350
|
+
});
|
|
344
351
|
```
|
|
345
352
|
|
|
346
353
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -360,12 +367,12 @@
|
|
|
360
367
|
example:
|
|
361
368
|
|
|
362
369
|
```js
|
|
363
|
-
import { defineConfig } from
|
|
370
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
364
371
|
export default defineConfig({
|
|
365
372
|
source: {
|
|
366
|
-
preEntry:
|
|
373
|
+
preEntry: "./src/polyfill.ts",
|
|
367
374
|
},
|
|
368
|
-
})
|
|
375
|
+
});
|
|
369
376
|
```
|
|
370
377
|
|
|
371
378
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -376,17 +383,17 @@
|
|
|
376
383
|
|
|
377
384
|
```js
|
|
378
385
|
export const myPlugin = {
|
|
379
|
-
name:
|
|
386
|
+
name: "my-plugin",
|
|
380
387
|
setup(api) {
|
|
381
|
-
const { callerName } = api.context
|
|
388
|
+
const { callerName } = api.context;
|
|
382
389
|
|
|
383
|
-
if (callerName ===
|
|
390
|
+
if (callerName === "rslib") {
|
|
384
391
|
// ...
|
|
385
|
-
} else if (callerName ===
|
|
392
|
+
} else if (callerName === "rspeedy") {
|
|
386
393
|
// ...
|
|
387
394
|
}
|
|
388
395
|
},
|
|
389
|
-
}
|
|
396
|
+
};
|
|
390
397
|
```
|
|
391
398
|
|
|
392
399
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -409,7 +416,7 @@
|
|
|
409
416
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
410
417
|
|
|
411
418
|
```js
|
|
412
|
-
import { defineConfig } from
|
|
419
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
413
420
|
|
|
414
421
|
export default defineConfig({
|
|
415
422
|
tools: {
|
|
@@ -419,7 +426,7 @@
|
|
|
419
426
|
},
|
|
420
427
|
},
|
|
421
428
|
},
|
|
422
|
-
})
|
|
429
|
+
});
|
|
423
430
|
```
|
|
424
431
|
|
|
425
432
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -551,12 +558,12 @@
|
|
|
551
558
|
example:
|
|
552
559
|
|
|
553
560
|
```js
|
|
554
|
-
import { defineConfig } from
|
|
561
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
555
562
|
export default defineConfig({
|
|
556
563
|
server: {
|
|
557
|
-
base:
|
|
564
|
+
base: "/dist",
|
|
558
565
|
},
|
|
559
|
-
})
|
|
566
|
+
});
|
|
560
567
|
```
|
|
561
568
|
|
|
562
569
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -609,11 +616,11 @@
|
|
|
609
616
|
You can switch to other tools by using:
|
|
610
617
|
|
|
611
618
|
```js
|
|
612
|
-
import { defineConfig } from
|
|
619
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
613
620
|
import {
|
|
614
621
|
CssMinimizerWebpackPlugin,
|
|
615
622
|
pluginCssMinimizer,
|
|
616
|
-
} from
|
|
623
|
+
} from "@rsbuild/plugin-css-minimizer";
|
|
617
624
|
|
|
618
625
|
export default defineConfig({
|
|
619
626
|
plugins: [
|
|
@@ -626,7 +633,7 @@
|
|
|
626
633
|
},
|
|
627
634
|
}),
|
|
628
635
|
],
|
|
629
|
-
})
|
|
636
|
+
});
|
|
630
637
|
```
|
|
631
638
|
|
|
632
639
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -636,8 +643,8 @@
|
|
|
636
643
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
637
644
|
|
|
638
645
|
```js
|
|
639
|
-
import { defineConfig } from
|
|
640
|
-
import { pluginCssMinimizer } from
|
|
646
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
647
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
641
648
|
|
|
642
649
|
export default defineConfig({
|
|
643
650
|
plugins: [
|
|
@@ -649,7 +656,7 @@
|
|
|
649
656
|
},
|
|
650
657
|
}),
|
|
651
658
|
],
|
|
652
|
-
})
|
|
659
|
+
});
|
|
653
660
|
```
|
|
654
661
|
|
|
655
662
|
## 0.7.1
|
|
@@ -669,7 +676,7 @@
|
|
|
669
676
|
You may turn it off using `output.minify.css: false`:
|
|
670
677
|
|
|
671
678
|
```js
|
|
672
|
-
import { defineConfig } from
|
|
679
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
673
680
|
|
|
674
681
|
export default defineConfig({
|
|
675
682
|
output: {
|
|
@@ -677,18 +684,18 @@
|
|
|
677
684
|
css: false,
|
|
678
685
|
},
|
|
679
686
|
},
|
|
680
|
-
})
|
|
687
|
+
});
|
|
681
688
|
```
|
|
682
689
|
|
|
683
690
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
684
691
|
|
|
685
692
|
```js
|
|
686
|
-
import { defineConfig } from
|
|
687
|
-
import { pluginCssMinimizer } from
|
|
693
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
694
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
688
695
|
|
|
689
696
|
export default defineConfig({
|
|
690
697
|
plugins: [pluginCssMinimizer()],
|
|
691
|
-
})
|
|
698
|
+
});
|
|
692
699
|
```
|
|
693
700
|
|
|
694
701
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -715,22 +722,22 @@
|
|
|
715
722
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
716
723
|
|
|
717
724
|
```js
|
|
718
|
-
import { defineConfig } from
|
|
725
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
719
726
|
|
|
720
727
|
export default defineConfig({
|
|
721
728
|
dev: {
|
|
722
729
|
watchFiles: [
|
|
723
730
|
{
|
|
724
|
-
type:
|
|
725
|
-
paths: [
|
|
731
|
+
type: "reload-server",
|
|
732
|
+
paths: ["public/**/*.txt"],
|
|
726
733
|
},
|
|
727
734
|
{
|
|
728
|
-
type:
|
|
729
|
-
paths: [
|
|
735
|
+
type: "reload-page",
|
|
736
|
+
paths: ["public/**/*.json"],
|
|
730
737
|
},
|
|
731
738
|
],
|
|
732
739
|
},
|
|
733
|
-
})
|
|
740
|
+
});
|
|
734
741
|
```
|
|
735
742
|
|
|
736
743
|
- be9b003: Add `source.exclude`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/rspeedy-canary",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.10-canary-20251111-da466b23",
|
|
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.18.
|
|
53
|
+
"@lynx-js/web-rsbuild-server-middleware": "npm:@lynx-js/web-rsbuild-server-middleware-canary@0.18.4-canary-20251111-da466b23",
|
|
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.5.17",
|