@lynx-js/rspeedy-canary 0.10.0 → 0.10.1-canary-20250708-febda95a
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 +42 -40
- package/dist/src_config_validate_ts.js +24 -24
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
+
## 0.10.1-canary-20250708071821-febda95ae214f1a211a395c38f398d740642b651
|
|
4
|
+
|
|
3
5
|
## 0.10.0
|
|
4
6
|
|
|
5
7
|
### Minor Changes
|
|
@@ -20,28 +22,28 @@
|
|
|
20
22
|
|
|
21
23
|
```ts
|
|
22
24
|
type InlineChunkTestFunction = (params: {
|
|
23
|
-
size: number
|
|
24
|
-
name: string
|
|
25
|
-
}) => boolean
|
|
25
|
+
size: number;
|
|
26
|
+
name: string;
|
|
27
|
+
}) => boolean;
|
|
26
28
|
|
|
27
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
29
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction;
|
|
28
30
|
|
|
29
31
|
type InlineChunkConfig =
|
|
30
32
|
| boolean
|
|
31
33
|
| InlineChunkTest
|
|
32
|
-
| { enable?: boolean |
|
|
34
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
33
35
|
```
|
|
34
36
|
|
|
35
37
|
```ts
|
|
36
|
-
import { defineConfig } from
|
|
38
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
37
39
|
|
|
38
40
|
export default defineConfig({
|
|
39
41
|
output: {
|
|
40
42
|
inlineScripts: ({ name, size }) => {
|
|
41
|
-
return name.includes(
|
|
43
|
+
return name.includes("foo") && size < 1000;
|
|
42
44
|
},
|
|
43
45
|
},
|
|
44
|
-
})
|
|
46
|
+
});
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
@@ -84,13 +86,13 @@
|
|
|
84
86
|
example:
|
|
85
87
|
|
|
86
88
|
```js
|
|
87
|
-
import { defineConfig } from
|
|
89
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
88
90
|
|
|
89
91
|
export default defineConfig({
|
|
90
92
|
output: {
|
|
91
93
|
inlineScripts: false,
|
|
92
94
|
},
|
|
93
|
-
})
|
|
95
|
+
});
|
|
94
96
|
```
|
|
95
97
|
|
|
96
98
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -110,12 +112,12 @@
|
|
|
110
112
|
example:
|
|
111
113
|
|
|
112
114
|
```js
|
|
113
|
-
import { defineConfig } from
|
|
115
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
114
116
|
export default defineConfig({
|
|
115
117
|
source: {
|
|
116
|
-
preEntry:
|
|
118
|
+
preEntry: "./src/polyfill.ts",
|
|
117
119
|
},
|
|
118
|
-
})
|
|
120
|
+
});
|
|
119
121
|
```
|
|
120
122
|
|
|
121
123
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -126,17 +128,17 @@
|
|
|
126
128
|
|
|
127
129
|
```js
|
|
128
130
|
export const myPlugin = {
|
|
129
|
-
name:
|
|
131
|
+
name: "my-plugin",
|
|
130
132
|
setup(api) {
|
|
131
|
-
const { callerName } = api.context
|
|
133
|
+
const { callerName } = api.context;
|
|
132
134
|
|
|
133
|
-
if (callerName ===
|
|
135
|
+
if (callerName === "rslib") {
|
|
134
136
|
// ...
|
|
135
|
-
} else if (callerName ===
|
|
137
|
+
} else if (callerName === "rspeedy") {
|
|
136
138
|
// ...
|
|
137
139
|
}
|
|
138
140
|
},
|
|
139
|
-
}
|
|
141
|
+
};
|
|
140
142
|
```
|
|
141
143
|
|
|
142
144
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -159,7 +161,7 @@
|
|
|
159
161
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
160
162
|
|
|
161
163
|
```js
|
|
162
|
-
import { defineConfig } from
|
|
164
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
163
165
|
|
|
164
166
|
export default defineConfig({
|
|
165
167
|
tools: {
|
|
@@ -169,7 +171,7 @@
|
|
|
169
171
|
},
|
|
170
172
|
},
|
|
171
173
|
},
|
|
172
|
-
})
|
|
174
|
+
});
|
|
173
175
|
```
|
|
174
176
|
|
|
175
177
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -301,12 +303,12 @@
|
|
|
301
303
|
example:
|
|
302
304
|
|
|
303
305
|
```js
|
|
304
|
-
import { defineConfig } from
|
|
306
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
305
307
|
export default defineConfig({
|
|
306
308
|
server: {
|
|
307
|
-
base:
|
|
309
|
+
base: "/dist",
|
|
308
310
|
},
|
|
309
|
-
})
|
|
311
|
+
});
|
|
310
312
|
```
|
|
311
313
|
|
|
312
314
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -359,11 +361,11 @@
|
|
|
359
361
|
You can switch to other tools by using:
|
|
360
362
|
|
|
361
363
|
```js
|
|
362
|
-
import { defineConfig } from
|
|
364
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
363
365
|
import {
|
|
364
366
|
CssMinimizerWebpackPlugin,
|
|
365
367
|
pluginCssMinimizer,
|
|
366
|
-
} from
|
|
368
|
+
} from "@rsbuild/plugin-css-minimizer";
|
|
367
369
|
|
|
368
370
|
export default defineConfig({
|
|
369
371
|
plugins: [
|
|
@@ -376,7 +378,7 @@
|
|
|
376
378
|
},
|
|
377
379
|
}),
|
|
378
380
|
],
|
|
379
|
-
})
|
|
381
|
+
});
|
|
380
382
|
```
|
|
381
383
|
|
|
382
384
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -386,8 +388,8 @@
|
|
|
386
388
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
387
389
|
|
|
388
390
|
```js
|
|
389
|
-
import { defineConfig } from
|
|
390
|
-
import { pluginCssMinimizer } from
|
|
391
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
392
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
391
393
|
|
|
392
394
|
export default defineConfig({
|
|
393
395
|
plugins: [
|
|
@@ -399,7 +401,7 @@
|
|
|
399
401
|
},
|
|
400
402
|
}),
|
|
401
403
|
],
|
|
402
|
-
})
|
|
404
|
+
});
|
|
403
405
|
```
|
|
404
406
|
|
|
405
407
|
## 0.7.1
|
|
@@ -419,7 +421,7 @@
|
|
|
419
421
|
You may turn it off using `output.minify.css: false`:
|
|
420
422
|
|
|
421
423
|
```js
|
|
422
|
-
import { defineConfig } from
|
|
424
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
423
425
|
|
|
424
426
|
export default defineConfig({
|
|
425
427
|
output: {
|
|
@@ -427,18 +429,18 @@
|
|
|
427
429
|
css: false,
|
|
428
430
|
},
|
|
429
431
|
},
|
|
430
|
-
})
|
|
432
|
+
});
|
|
431
433
|
```
|
|
432
434
|
|
|
433
435
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
434
436
|
|
|
435
437
|
```js
|
|
436
|
-
import { defineConfig } from
|
|
437
|
-
import { pluginCssMinimizer } from
|
|
438
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
439
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
438
440
|
|
|
439
441
|
export default defineConfig({
|
|
440
442
|
plugins: [pluginCssMinimizer()],
|
|
441
|
-
})
|
|
443
|
+
});
|
|
442
444
|
```
|
|
443
445
|
|
|
444
446
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -465,22 +467,22 @@
|
|
|
465
467
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
466
468
|
|
|
467
469
|
```js
|
|
468
|
-
import { defineConfig } from
|
|
470
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
469
471
|
|
|
470
472
|
export default defineConfig({
|
|
471
473
|
dev: {
|
|
472
474
|
watchFiles: [
|
|
473
475
|
{
|
|
474
|
-
type:
|
|
475
|
-
paths: [
|
|
476
|
+
type: "reload-server",
|
|
477
|
+
paths: ["public/**/*.txt"],
|
|
476
478
|
},
|
|
477
479
|
{
|
|
478
|
-
type:
|
|
479
|
-
paths: [
|
|
480
|
+
type: "reload-page",
|
|
481
|
+
paths: ["public/**/*.json"],
|
|
480
482
|
},
|
|
481
483
|
],
|
|
482
484
|
},
|
|
483
|
-
})
|
|
485
|
+
});
|
|
484
486
|
```
|
|
485
487
|
|
|
486
488
|
- be9b003: Add `source.exclude`.
|
|
@@ -1464,9 +1464,9 @@ export const __webpack_modules__ = {
|
|
|
1464
1464
|
if (void 0 === value) return true;
|
|
1465
1465
|
return "string" == typeof value || "boolean" == typeof value;
|
|
1466
1466
|
});
|
|
1467
|
-
const _io39 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@
|
|
1467
|
+
const _io39 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@6572"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
|
|
1468
1468
|
if ([
|
|
1469
|
-
"__@toStringTag@
|
|
1469
|
+
"__@toStringTag@6572"
|
|
1470
1470
|
].some((prop)=>key === prop)) return true;
|
|
1471
1471
|
const value = input[key];
|
|
1472
1472
|
if (void 0 === value) return true;
|
|
@@ -3066,14 +3066,14 @@ export const __webpack_modules__ = {
|
|
|
3066
3066
|
if (void 0 === value) return true;
|
|
3067
3067
|
return false;
|
|
3068
3068
|
})));
|
|
3069
|
-
const _io147 = (input, _exceptionable = true)=>"number" == typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" == typeof input.byteLength && "number" == typeof input.byteOffset && "number" == typeof input.length && "Uint8Array" === input["__@toStringTag@
|
|
3069
|
+
const _io147 = (input, _exceptionable = true)=>"number" == typeof input.BYTES_PER_ELEMENT && (input.buffer instanceof ArrayBuffer || input.buffer instanceof SharedArrayBuffer) && "number" == typeof input.byteLength && "number" == typeof input.byteOffset && "number" == typeof input.length && "Uint8Array" === input["__@toStringTag@6572"] && Object.keys(input).every((key)=>{
|
|
3070
3070
|
if ([
|
|
3071
3071
|
"BYTES_PER_ELEMENT",
|
|
3072
3072
|
"buffer",
|
|
3073
3073
|
"byteLength",
|
|
3074
3074
|
"byteOffset",
|
|
3075
3075
|
"length",
|
|
3076
|
-
"__@toStringTag@
|
|
3076
|
+
"__@toStringTag@6572"
|
|
3077
3077
|
].some((prop)=>key === prop)) return true;
|
|
3078
3078
|
const value = input[key];
|
|
3079
3079
|
if (void 0 === value) return true;
|
|
@@ -6282,9 +6282,9 @@ export const __webpack_modules__ = {
|
|
|
6282
6282
|
if (void 0 === value) return true;
|
|
6283
6283
|
return false;
|
|
6284
6284
|
}));
|
|
6285
|
-
const _io401 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@
|
|
6285
|
+
const _io401 = (input, _exceptionable = true)=>"string" == typeof input["__@toStringTag@6572"] && (1 === Object.keys(input).length || Object.keys(input).every((key)=>{
|
|
6286
6286
|
if ([
|
|
6287
|
-
"__@toStringTag@
|
|
6287
|
+
"__@toStringTag@6572"
|
|
6288
6288
|
].some((prop)=>key === prop)) return true;
|
|
6289
6289
|
const value = input[key];
|
|
6290
6290
|
if (void 0 === value) return true;
|
|
@@ -6873,18 +6873,18 @@ export const __webpack_modules__ = {
|
|
|
6873
6873
|
return false;
|
|
6874
6874
|
})();
|
|
6875
6875
|
const _iu1 = (input, _exceptionable = true)=>(()=>{
|
|
6876
|
-
if (void 0 !== input["__@toStringTag@
|
|
6876
|
+
if (void 0 !== input["__@toStringTag@6572"]) return _io147(input, _exceptionable);
|
|
6877
6877
|
if (void 0 !== input.pem) return _io148(input, _exceptionable);
|
|
6878
6878
|
return false;
|
|
6879
6879
|
})();
|
|
6880
6880
|
const _iu2 = (input, _exceptionable = true)=>(()=>{
|
|
6881
|
-
if (void 0 !== input["__@toStringTag@
|
|
6881
|
+
if (void 0 !== input["__@toStringTag@6572"]) return _io147(input, _exceptionable);
|
|
6882
6882
|
if (void 0 !== input.buf) return _io149(input, _exceptionable);
|
|
6883
6883
|
return false;
|
|
6884
6884
|
})();
|
|
6885
6885
|
const _iu3 = (input, _exceptionable = true)=>(()=>{
|
|
6886
6886
|
if (void 0 !== input.name) return _io400(input, _exceptionable);
|
|
6887
|
-
if (void 0 !== input["__@toStringTag@
|
|
6887
|
+
if (void 0 !== input["__@toStringTag@6572"]) return _io401(input, _exceptionable);
|
|
6888
6888
|
return false;
|
|
6889
6889
|
})();
|
|
6890
6890
|
const _iu4 = (input, _exceptionable = true)=>(()=>{
|
|
@@ -9234,14 +9234,14 @@ export const __webpack_modules__ = {
|
|
|
9234
9234
|
}).every((flag)=>flag)
|
|
9235
9235
|
].every((flag)=>flag);
|
|
9236
9236
|
const _vo39 = (input, _path, _exceptionable = true)=>[
|
|
9237
|
-
"string" == typeof input["__@toStringTag@
|
|
9238
|
-
path: _path + "[\"__@toStringTag@
|
|
9237
|
+
"string" == typeof input["__@toStringTag@6572"] || _report(_exceptionable, {
|
|
9238
|
+
path: _path + "[\"__@toStringTag@6572\"]",
|
|
9239
9239
|
expected: "string",
|
|
9240
|
-
value: input["__@toStringTag@
|
|
9240
|
+
value: input["__@toStringTag@6572"]
|
|
9241
9241
|
}),
|
|
9242
9242
|
1 === Object.keys(input).length || false === _exceptionable || Object.keys(input).map((key)=>{
|
|
9243
9243
|
if ([
|
|
9244
|
-
"__@toStringTag@
|
|
9244
|
+
"__@toStringTag@6572"
|
|
9245
9245
|
].some((prop)=>key === prop)) return true;
|
|
9246
9246
|
const value = input[key];
|
|
9247
9247
|
if (void 0 === value) return true;
|
|
@@ -17771,10 +17771,10 @@ export const __webpack_modules__ = {
|
|
|
17771
17771
|
expected: "number",
|
|
17772
17772
|
value: input.length
|
|
17773
17773
|
}),
|
|
17774
|
-
"Uint8Array" === input["__@toStringTag@
|
|
17775
|
-
path: _path + "[\"__@toStringTag@
|
|
17774
|
+
"Uint8Array" === input["__@toStringTag@6572"] || _report(_exceptionable, {
|
|
17775
|
+
path: _path + "[\"__@toStringTag@6572\"]",
|
|
17776
17776
|
expected: "\"Uint8Array\"",
|
|
17777
|
-
value: input["__@toStringTag@
|
|
17777
|
+
value: input["__@toStringTag@6572"]
|
|
17778
17778
|
}),
|
|
17779
17779
|
false === _exceptionable || Object.keys(input).map((key)=>{
|
|
17780
17780
|
if ([
|
|
@@ -17783,7 +17783,7 @@ export const __webpack_modules__ = {
|
|
|
17783
17783
|
"byteLength",
|
|
17784
17784
|
"byteOffset",
|
|
17785
17785
|
"length",
|
|
17786
|
-
"__@toStringTag@
|
|
17786
|
+
"__@toStringTag@6572"
|
|
17787
17787
|
].some((prop)=>key === prop)) return true;
|
|
17788
17788
|
const value = input[key];
|
|
17789
17789
|
if (void 0 === value) return true;
|
|
@@ -34632,14 +34632,14 @@ export const __webpack_modules__ = {
|
|
|
34632
34632
|
}).every((flag)=>flag)
|
|
34633
34633
|
].every((flag)=>flag);
|
|
34634
34634
|
const _vo401 = (input, _path, _exceptionable = true)=>[
|
|
34635
|
-
"string" == typeof input["__@toStringTag@
|
|
34636
|
-
path: _path + "[\"__@toStringTag@
|
|
34635
|
+
"string" == typeof input["__@toStringTag@6572"] || _report(_exceptionable, {
|
|
34636
|
+
path: _path + "[\"__@toStringTag@6572\"]",
|
|
34637
34637
|
expected: "string",
|
|
34638
|
-
value: input["__@toStringTag@
|
|
34638
|
+
value: input["__@toStringTag@6572"]
|
|
34639
34639
|
}),
|
|
34640
34640
|
1 === Object.keys(input).length || false === _exceptionable || Object.keys(input).map((key)=>{
|
|
34641
34641
|
if ([
|
|
34642
|
-
"__@toStringTag@
|
|
34642
|
+
"__@toStringTag@6572"
|
|
34643
34643
|
].some((prop)=>key === prop)) return true;
|
|
34644
34644
|
const value = input[key];
|
|
34645
34645
|
if (void 0 === value) return true;
|
|
@@ -37376,7 +37376,7 @@ export const __webpack_modules__ = {
|
|
|
37376
37376
|
});
|
|
37377
37377
|
})();
|
|
37378
37378
|
const _vu1 = (input, _path, _exceptionable = true)=>(()=>{
|
|
37379
|
-
if (void 0 !== input["__@toStringTag@
|
|
37379
|
+
if (void 0 !== input["__@toStringTag@6572"]) return _vo147(input, _path, _exceptionable);
|
|
37380
37380
|
if (void 0 !== input.pem) return _vo148(input, _path, _exceptionable);
|
|
37381
37381
|
return _report(_exceptionable, {
|
|
37382
37382
|
path: _path,
|
|
@@ -37385,7 +37385,7 @@ export const __webpack_modules__ = {
|
|
|
37385
37385
|
});
|
|
37386
37386
|
})();
|
|
37387
37387
|
const _vu2 = (input, _path, _exceptionable = true)=>(()=>{
|
|
37388
|
-
if (void 0 !== input["__@toStringTag@
|
|
37388
|
+
if (void 0 !== input["__@toStringTag@6572"]) return _vo147(input, _path, _exceptionable);
|
|
37389
37389
|
if (void 0 !== input.buf) return _vo149(input, _path, _exceptionable);
|
|
37390
37390
|
return _report(_exceptionable, {
|
|
37391
37391
|
path: _path,
|
|
@@ -37395,7 +37395,7 @@ export const __webpack_modules__ = {
|
|
|
37395
37395
|
})();
|
|
37396
37396
|
const _vu3 = (input, _path, _exceptionable = true)=>(()=>{
|
|
37397
37397
|
if (void 0 !== input.name) return _vo400(input, _path, _exceptionable);
|
|
37398
|
-
if (void 0 !== input["__@toStringTag@
|
|
37398
|
+
if (void 0 !== input["__@toStringTag@6572"]) return _vo401(input, _path, _exceptionable);
|
|
37399
37399
|
return _report(_exceptionable, {
|
|
37400
37400
|
path: _path,
|
|
37401
37401
|
expected: "(LooseRsbuildPlugin | RsbuildPlugins | LooseRsbuildPlugin | Falsy)",
|