@lynx-js/rspeedy-canary 0.12.1 → 0.12.2-canary-20251209-f7256d5b
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.2-canary-20251209082047-f7256d5bd920b2f6c0cadab44455585c35621b35
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @lynx-js/web-rsbuild-server-middleware@0.19.1-canary-20251209082047-f7256d5bd920b2f6c0cadab44455585c35621b35
|
|
9
|
+
|
|
3
10
|
## 0.12.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -96,11 +103,11 @@
|
|
|
96
103
|
- Support `command` and `env` parameters in the function exported by `lynx.config.js`. ([#1669](https://github.com/lynx-family/lynx-stack/pull/1669))
|
|
97
104
|
|
|
98
105
|
```js
|
|
99
|
-
import { defineConfig } from
|
|
106
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
100
107
|
|
|
101
108
|
export default defineConfig(({ command, env }) => {
|
|
102
|
-
const isBuild = command ===
|
|
103
|
-
const isTest = env ===
|
|
109
|
+
const isBuild = command === "build";
|
|
110
|
+
const isTest = env === "test";
|
|
104
111
|
|
|
105
112
|
return {
|
|
106
113
|
output: {
|
|
@@ -109,8 +116,8 @@
|
|
|
109
116
|
performance: {
|
|
110
117
|
buildCache: isBuild,
|
|
111
118
|
},
|
|
112
|
-
}
|
|
113
|
-
})
|
|
119
|
+
};
|
|
120
|
+
});
|
|
114
121
|
```
|
|
115
122
|
|
|
116
123
|
- Support `resolve.dedupe`. ([#1671](https://github.com/lynx-family/lynx-stack/pull/1671))
|
|
@@ -118,30 +125,30 @@
|
|
|
118
125
|
This is useful when having multiple duplicated packages in the bundle:
|
|
119
126
|
|
|
120
127
|
```js
|
|
121
|
-
import { defineConfig } from
|
|
128
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
122
129
|
|
|
123
130
|
export default defineConfig({
|
|
124
131
|
resolve: {
|
|
125
|
-
dedupe: [
|
|
132
|
+
dedupe: ["tslib"],
|
|
126
133
|
},
|
|
127
|
-
})
|
|
134
|
+
});
|
|
128
135
|
```
|
|
129
136
|
|
|
130
137
|
- Support `resolve.aliasStrategy` for controlling priority between `tsconfig.json` paths and `resolve.alias` ([#1722](https://github.com/lynx-family/lynx-stack/pull/1722))
|
|
131
138
|
|
|
132
139
|
```js
|
|
133
|
-
import { defineConfig } from
|
|
140
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
134
141
|
|
|
135
142
|
export default defineConfig({
|
|
136
143
|
resolve: {
|
|
137
144
|
alias: {
|
|
138
|
-
|
|
145
|
+
"@": "./src",
|
|
139
146
|
},
|
|
140
147
|
// 'prefer-tsconfig' (default): tsconfig.json paths take priority
|
|
141
148
|
// 'prefer-alias': resolve.alias takes priority
|
|
142
|
-
aliasStrategy:
|
|
149
|
+
aliasStrategy: "prefer-alias",
|
|
143
150
|
},
|
|
144
|
-
})
|
|
151
|
+
});
|
|
145
152
|
```
|
|
146
153
|
|
|
147
154
|
- Bump Rsbuild v1.5.4 with Rspack v1.5.2. ([#1644](https://github.com/lynx-family/lynx-stack/pull/1644))
|
|
@@ -161,7 +168,7 @@
|
|
|
161
168
|
- Add `output.dataUriLimit.*` for fine-grained control of asset inlining. ([#1648](https://github.com/lynx-family/lynx-stack/pull/1648))
|
|
162
169
|
|
|
163
170
|
```js
|
|
164
|
-
import { defineConfig } from
|
|
171
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
165
172
|
|
|
166
173
|
export default defineConfig({
|
|
167
174
|
output: {
|
|
@@ -170,7 +177,7 @@
|
|
|
170
177
|
media: 0,
|
|
171
178
|
},
|
|
172
179
|
},
|
|
173
|
-
})
|
|
180
|
+
});
|
|
174
181
|
```
|
|
175
182
|
|
|
176
183
|
## 0.11.0
|
|
@@ -290,28 +297,28 @@
|
|
|
290
297
|
|
|
291
298
|
```ts
|
|
292
299
|
type InlineChunkTestFunction = (params: {
|
|
293
|
-
size: number
|
|
294
|
-
name: string
|
|
295
|
-
}) => boolean
|
|
300
|
+
size: number;
|
|
301
|
+
name: string;
|
|
302
|
+
}) => boolean;
|
|
296
303
|
|
|
297
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
304
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction;
|
|
298
305
|
|
|
299
306
|
type InlineChunkConfig =
|
|
300
307
|
| boolean
|
|
301
308
|
| InlineChunkTest
|
|
302
|
-
| { enable?: boolean |
|
|
309
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
303
310
|
```
|
|
304
311
|
|
|
305
312
|
```ts
|
|
306
|
-
import { defineConfig } from
|
|
313
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
307
314
|
|
|
308
315
|
export default defineConfig({
|
|
309
316
|
output: {
|
|
310
317
|
inlineScripts: ({ name, size }) => {
|
|
311
|
-
return name.includes(
|
|
318
|
+
return name.includes("foo") && size < 1000;
|
|
312
319
|
},
|
|
313
320
|
},
|
|
314
|
-
})
|
|
321
|
+
});
|
|
315
322
|
```
|
|
316
323
|
|
|
317
324
|
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
@@ -354,13 +361,13 @@
|
|
|
354
361
|
example:
|
|
355
362
|
|
|
356
363
|
```js
|
|
357
|
-
import { defineConfig } from
|
|
364
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
358
365
|
|
|
359
366
|
export default defineConfig({
|
|
360
367
|
output: {
|
|
361
368
|
inlineScripts: false,
|
|
362
369
|
},
|
|
363
|
-
})
|
|
370
|
+
});
|
|
364
371
|
```
|
|
365
372
|
|
|
366
373
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -380,12 +387,12 @@
|
|
|
380
387
|
example:
|
|
381
388
|
|
|
382
389
|
```js
|
|
383
|
-
import { defineConfig } from
|
|
390
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
384
391
|
export default defineConfig({
|
|
385
392
|
source: {
|
|
386
|
-
preEntry:
|
|
393
|
+
preEntry: "./src/polyfill.ts",
|
|
387
394
|
},
|
|
388
|
-
})
|
|
395
|
+
});
|
|
389
396
|
```
|
|
390
397
|
|
|
391
398
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -396,17 +403,17 @@
|
|
|
396
403
|
|
|
397
404
|
```js
|
|
398
405
|
export const myPlugin = {
|
|
399
|
-
name:
|
|
406
|
+
name: "my-plugin",
|
|
400
407
|
setup(api) {
|
|
401
|
-
const { callerName } = api.context
|
|
408
|
+
const { callerName } = api.context;
|
|
402
409
|
|
|
403
|
-
if (callerName ===
|
|
410
|
+
if (callerName === "rslib") {
|
|
404
411
|
// ...
|
|
405
|
-
} else if (callerName ===
|
|
412
|
+
} else if (callerName === "rspeedy") {
|
|
406
413
|
// ...
|
|
407
414
|
}
|
|
408
415
|
},
|
|
409
|
-
}
|
|
416
|
+
};
|
|
410
417
|
```
|
|
411
418
|
|
|
412
419
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -429,7 +436,7 @@
|
|
|
429
436
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
430
437
|
|
|
431
438
|
```js
|
|
432
|
-
import { defineConfig } from
|
|
439
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
433
440
|
|
|
434
441
|
export default defineConfig({
|
|
435
442
|
tools: {
|
|
@@ -439,7 +446,7 @@
|
|
|
439
446
|
},
|
|
440
447
|
},
|
|
441
448
|
},
|
|
442
|
-
})
|
|
449
|
+
});
|
|
443
450
|
```
|
|
444
451
|
|
|
445
452
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -571,12 +578,12 @@
|
|
|
571
578
|
example:
|
|
572
579
|
|
|
573
580
|
```js
|
|
574
|
-
import { defineConfig } from
|
|
581
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
575
582
|
export default defineConfig({
|
|
576
583
|
server: {
|
|
577
|
-
base:
|
|
584
|
+
base: "/dist",
|
|
578
585
|
},
|
|
579
|
-
})
|
|
586
|
+
});
|
|
580
587
|
```
|
|
581
588
|
|
|
582
589
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -629,11 +636,11 @@
|
|
|
629
636
|
You can switch to other tools by using:
|
|
630
637
|
|
|
631
638
|
```js
|
|
632
|
-
import { defineConfig } from
|
|
639
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
633
640
|
import {
|
|
634
641
|
CssMinimizerWebpackPlugin,
|
|
635
642
|
pluginCssMinimizer,
|
|
636
|
-
} from
|
|
643
|
+
} from "@rsbuild/plugin-css-minimizer";
|
|
637
644
|
|
|
638
645
|
export default defineConfig({
|
|
639
646
|
plugins: [
|
|
@@ -646,7 +653,7 @@
|
|
|
646
653
|
},
|
|
647
654
|
}),
|
|
648
655
|
],
|
|
649
|
-
})
|
|
656
|
+
});
|
|
650
657
|
```
|
|
651
658
|
|
|
652
659
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -656,8 +663,8 @@
|
|
|
656
663
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
657
664
|
|
|
658
665
|
```js
|
|
659
|
-
import { defineConfig } from
|
|
660
|
-
import { pluginCssMinimizer } from
|
|
666
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
667
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
661
668
|
|
|
662
669
|
export default defineConfig({
|
|
663
670
|
plugins: [
|
|
@@ -669,7 +676,7 @@
|
|
|
669
676
|
},
|
|
670
677
|
}),
|
|
671
678
|
],
|
|
672
|
-
})
|
|
679
|
+
});
|
|
673
680
|
```
|
|
674
681
|
|
|
675
682
|
## 0.7.1
|
|
@@ -689,7 +696,7 @@
|
|
|
689
696
|
You may turn it off using `output.minify.css: false`:
|
|
690
697
|
|
|
691
698
|
```js
|
|
692
|
-
import { defineConfig } from
|
|
699
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
693
700
|
|
|
694
701
|
export default defineConfig({
|
|
695
702
|
output: {
|
|
@@ -697,18 +704,18 @@
|
|
|
697
704
|
css: false,
|
|
698
705
|
},
|
|
699
706
|
},
|
|
700
|
-
})
|
|
707
|
+
});
|
|
701
708
|
```
|
|
702
709
|
|
|
703
710
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
704
711
|
|
|
705
712
|
```js
|
|
706
|
-
import { defineConfig } from
|
|
707
|
-
import { pluginCssMinimizer } from
|
|
713
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
714
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
708
715
|
|
|
709
716
|
export default defineConfig({
|
|
710
717
|
plugins: [pluginCssMinimizer()],
|
|
711
|
-
})
|
|
718
|
+
});
|
|
712
719
|
```
|
|
713
720
|
|
|
714
721
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -735,22 +742,22 @@
|
|
|
735
742
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
736
743
|
|
|
737
744
|
```js
|
|
738
|
-
import { defineConfig } from
|
|
745
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
739
746
|
|
|
740
747
|
export default defineConfig({
|
|
741
748
|
dev: {
|
|
742
749
|
watchFiles: [
|
|
743
750
|
{
|
|
744
|
-
type:
|
|
745
|
-
paths: [
|
|
751
|
+
type: "reload-server",
|
|
752
|
+
paths: ["public/**/*.txt"],
|
|
746
753
|
},
|
|
747
754
|
{
|
|
748
|
-
type:
|
|
749
|
-
paths: [
|
|
755
|
+
type: "reload-page",
|
|
756
|
+
paths: ["public/**/*.json"],
|
|
750
757
|
},
|
|
751
758
|
],
|
|
752
759
|
},
|
|
753
|
-
})
|
|
760
|
+
});
|
|
754
761
|
```
|
|
755
762
|
|
|
756
763
|
- 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.2-canary-20251209-f7256d5b",
|
|
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.1-canary-20251209-f7256d5b",
|
|
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.9",
|