@lynx-js/rspeedy-canary 0.11.0 → 0.11.1-canary-20250901-1f3019c1
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
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
+
## 0.11.1-canary-20250901100547-1f3019c1fd68548f268e17e4af437fd27391bb07
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Bump Rsbuild v1.5.2 with Rspack v1.5.1. ([#1624](https://github.com/lynx-family/lynx-stack/pull/1624))
|
|
8
|
+
|
|
3
9
|
## 0.11.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -117,28 +123,28 @@
|
|
|
117
123
|
|
|
118
124
|
```ts
|
|
119
125
|
type InlineChunkTestFunction = (params: {
|
|
120
|
-
size: number
|
|
121
|
-
name: string
|
|
122
|
-
}) => boolean
|
|
126
|
+
size: number;
|
|
127
|
+
name: string;
|
|
128
|
+
}) => boolean;
|
|
123
129
|
|
|
124
|
-
type InlineChunkTest = RegExp | InlineChunkTestFunction
|
|
130
|
+
type InlineChunkTest = RegExp | InlineChunkTestFunction;
|
|
125
131
|
|
|
126
132
|
type InlineChunkConfig =
|
|
127
133
|
| boolean
|
|
128
134
|
| InlineChunkTest
|
|
129
|
-
| { enable?: boolean |
|
|
135
|
+
| { enable?: boolean | "auto"; test: InlineChunkTest };
|
|
130
136
|
```
|
|
131
137
|
|
|
132
138
|
```ts
|
|
133
|
-
import { defineConfig } from
|
|
139
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
134
140
|
|
|
135
141
|
export default defineConfig({
|
|
136
142
|
output: {
|
|
137
143
|
inlineScripts: ({ name, size }) => {
|
|
138
|
-
return name.includes(
|
|
144
|
+
return name.includes("foo") && size < 1000;
|
|
139
145
|
},
|
|
140
146
|
},
|
|
141
|
-
})
|
|
147
|
+
});
|
|
142
148
|
```
|
|
143
149
|
|
|
144
150
|
- docs: remove chunks: 'all' in comments ([#1168](https://github.com/lynx-family/lynx-stack/pull/1168))
|
|
@@ -181,13 +187,13 @@
|
|
|
181
187
|
example:
|
|
182
188
|
|
|
183
189
|
```js
|
|
184
|
-
import { defineConfig } from
|
|
190
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
185
191
|
|
|
186
192
|
export default defineConfig({
|
|
187
193
|
output: {
|
|
188
194
|
inlineScripts: false,
|
|
189
195
|
},
|
|
190
|
-
})
|
|
196
|
+
});
|
|
191
197
|
```
|
|
192
198
|
|
|
193
199
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -207,12 +213,12 @@
|
|
|
207
213
|
example:
|
|
208
214
|
|
|
209
215
|
```js
|
|
210
|
-
import { defineConfig } from
|
|
216
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
211
217
|
export default defineConfig({
|
|
212
218
|
source: {
|
|
213
|
-
preEntry:
|
|
219
|
+
preEntry: "./src/polyfill.ts",
|
|
214
220
|
},
|
|
215
|
-
})
|
|
221
|
+
});
|
|
216
222
|
```
|
|
217
223
|
|
|
218
224
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -223,17 +229,17 @@
|
|
|
223
229
|
|
|
224
230
|
```js
|
|
225
231
|
export const myPlugin = {
|
|
226
|
-
name:
|
|
232
|
+
name: "my-plugin",
|
|
227
233
|
setup(api) {
|
|
228
|
-
const { callerName } = api.context
|
|
234
|
+
const { callerName } = api.context;
|
|
229
235
|
|
|
230
|
-
if (callerName ===
|
|
236
|
+
if (callerName === "rslib") {
|
|
231
237
|
// ...
|
|
232
|
-
} else if (callerName ===
|
|
238
|
+
} else if (callerName === "rspeedy") {
|
|
233
239
|
// ...
|
|
234
240
|
}
|
|
235
241
|
},
|
|
236
|
-
}
|
|
242
|
+
};
|
|
237
243
|
```
|
|
238
244
|
|
|
239
245
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -256,7 +262,7 @@
|
|
|
256
262
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
257
263
|
|
|
258
264
|
```js
|
|
259
|
-
import { defineConfig } from
|
|
265
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
260
266
|
|
|
261
267
|
export default defineConfig({
|
|
262
268
|
tools: {
|
|
@@ -266,7 +272,7 @@
|
|
|
266
272
|
},
|
|
267
273
|
},
|
|
268
274
|
},
|
|
269
|
-
})
|
|
275
|
+
});
|
|
270
276
|
```
|
|
271
277
|
|
|
272
278
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -398,12 +404,12 @@
|
|
|
398
404
|
example:
|
|
399
405
|
|
|
400
406
|
```js
|
|
401
|
-
import { defineConfig } from
|
|
407
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
402
408
|
export default defineConfig({
|
|
403
409
|
server: {
|
|
404
|
-
base:
|
|
410
|
+
base: "/dist",
|
|
405
411
|
},
|
|
406
|
-
})
|
|
412
|
+
});
|
|
407
413
|
```
|
|
408
414
|
|
|
409
415
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -456,11 +462,11 @@
|
|
|
456
462
|
You can switch to other tools by using:
|
|
457
463
|
|
|
458
464
|
```js
|
|
459
|
-
import { defineConfig } from
|
|
465
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
460
466
|
import {
|
|
461
467
|
CssMinimizerWebpackPlugin,
|
|
462
468
|
pluginCssMinimizer,
|
|
463
|
-
} from
|
|
469
|
+
} from "@rsbuild/plugin-css-minimizer";
|
|
464
470
|
|
|
465
471
|
export default defineConfig({
|
|
466
472
|
plugins: [
|
|
@@ -473,7 +479,7 @@
|
|
|
473
479
|
},
|
|
474
480
|
}),
|
|
475
481
|
],
|
|
476
|
-
})
|
|
482
|
+
});
|
|
477
483
|
```
|
|
478
484
|
|
|
479
485
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -483,8 +489,8 @@
|
|
|
483
489
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
484
490
|
|
|
485
491
|
```js
|
|
486
|
-
import { defineConfig } from
|
|
487
|
-
import { pluginCssMinimizer } from
|
|
492
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
493
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
488
494
|
|
|
489
495
|
export default defineConfig({
|
|
490
496
|
plugins: [
|
|
@@ -496,7 +502,7 @@
|
|
|
496
502
|
},
|
|
497
503
|
}),
|
|
498
504
|
],
|
|
499
|
-
})
|
|
505
|
+
});
|
|
500
506
|
```
|
|
501
507
|
|
|
502
508
|
## 0.7.1
|
|
@@ -516,7 +522,7 @@
|
|
|
516
522
|
You may turn it off using `output.minify.css: false`:
|
|
517
523
|
|
|
518
524
|
```js
|
|
519
|
-
import { defineConfig } from
|
|
525
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
520
526
|
|
|
521
527
|
export default defineConfig({
|
|
522
528
|
output: {
|
|
@@ -524,18 +530,18 @@
|
|
|
524
530
|
css: false,
|
|
525
531
|
},
|
|
526
532
|
},
|
|
527
|
-
})
|
|
533
|
+
});
|
|
528
534
|
```
|
|
529
535
|
|
|
530
536
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
531
537
|
|
|
532
538
|
```js
|
|
533
|
-
import { defineConfig } from
|
|
534
|
-
import { pluginCssMinimizer } from
|
|
539
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
540
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
535
541
|
|
|
536
542
|
export default defineConfig({
|
|
537
543
|
plugins: [pluginCssMinimizer()],
|
|
538
|
-
})
|
|
544
|
+
});
|
|
539
545
|
```
|
|
540
546
|
|
|
541
547
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -562,22 +568,22 @@
|
|
|
562
568
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
563
569
|
|
|
564
570
|
```js
|
|
565
|
-
import { defineConfig } from
|
|
571
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
566
572
|
|
|
567
573
|
export default defineConfig({
|
|
568
574
|
dev: {
|
|
569
575
|
watchFiles: [
|
|
570
576
|
{
|
|
571
|
-
type:
|
|
572
|
-
paths: [
|
|
577
|
+
type: "reload-server",
|
|
578
|
+
paths: ["public/**/*.txt"],
|
|
573
579
|
},
|
|
574
580
|
{
|
|
575
|
-
type:
|
|
576
|
-
paths: [
|
|
581
|
+
type: "reload-page",
|
|
582
|
+
paths: ["public/**/*.json"],
|
|
577
583
|
},
|
|
578
584
|
],
|
|
579
585
|
},
|
|
580
|
-
})
|
|
586
|
+
});
|
|
581
587
|
```
|
|
582
588
|
|
|
583
589
|
- be9b003: Add `source.exclude`.
|
|
@@ -20,11 +20,11 @@ export const __webpack_modules__ = {
|
|
|
20
20
|
config,
|
|
21
21
|
debug: _debug_js__WEBPACK_IMPORTED_MODULE_1__.Yz,
|
|
22
22
|
async exit (code) {
|
|
23
|
-
const { exit } = await
|
|
23
|
+
const { exit } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "./src/cli/exit.ts"));
|
|
24
24
|
return exit(code);
|
|
25
25
|
},
|
|
26
26
|
logger: _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.logger,
|
|
27
|
-
version: _version_js__WEBPACK_IMPORTED_MODULE_2__.
|
|
27
|
+
version: _version_js__WEBPACK_IMPORTED_MODULE_2__.version
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
};
|
|
@@ -8,10 +8,8 @@ export const __webpack_modules__ = {
|
|
|
8
8
|
__webpack_require__.d(__webpack_exports__, {
|
|
9
9
|
pluginRsdoctor: ()=>pluginRsdoctor
|
|
10
10
|
});
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
return !!process.env['CI'] && 'false' !== process.env['CI'];
|
|
14
|
-
}
|
|
11
|
+
var _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("@rsbuild/core");
|
|
12
|
+
var _utils_is_ci_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/is-ci.ts");
|
|
15
13
|
function pluginRsdoctor(options) {
|
|
16
14
|
return {
|
|
17
15
|
name: 'lynx:rsbuild:rsdoctor',
|
|
@@ -28,7 +26,7 @@ export const __webpack_modules__ = {
|
|
|
28
26
|
if (registered) continue;
|
|
29
27
|
config.plugins ??= [];
|
|
30
28
|
const defaultOptions = {
|
|
31
|
-
disableClientServer:
|
|
29
|
+
disableClientServer: (0, _utils_is_ci_js__WEBPACK_IMPORTED_MODULE_1__.J)(),
|
|
32
30
|
supports: {
|
|
33
31
|
banner: true
|
|
34
32
|
},
|
|
@@ -43,12 +41,20 @@ export const __webpack_modules__ = {
|
|
|
43
41
|
}
|
|
44
42
|
}
|
|
45
43
|
};
|
|
46
|
-
config.plugins.push(new RsdoctorRspackPlugin((0,
|
|
44
|
+
config.plugins.push(new RsdoctorRspackPlugin((0, _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.mergeRsbuildConfig)(defaultOptions, options)));
|
|
47
45
|
}
|
|
48
|
-
|
|
46
|
+
_rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.logger.info("Rsdoctor is enabled.");
|
|
49
47
|
});
|
|
50
48
|
}
|
|
51
49
|
};
|
|
52
50
|
}
|
|
51
|
+
},
|
|
52
|
+
"./src/utils/is-ci.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
53
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
54
|
+
J: ()=>isCI
|
|
55
|
+
});
|
|
56
|
+
function isCI() {
|
|
57
|
+
return !!process.env['CI'] && 'false' !== process.env['CI'];
|
|
58
|
+
}
|
|
53
59
|
}
|
|
54
60
|
};
|
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.1-canary-20250901-1f3019c1",
|
|
4
4
|
"description": "A webpack/rspack-based frontend toolchain for Lynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"@lynx-js/chunk-loading-webpack-plugin": "npm:@lynx-js/chunk-loading-webpack-plugin-canary@0.3.2",
|
|
53
53
|
"@lynx-js/webpack-dev-transport": "npm:@lynx-js/webpack-dev-transport-canary@0.2.0",
|
|
54
54
|
"@lynx-js/websocket": "npm:@lynx-js/websocket-canary@0.0.4",
|
|
55
|
-
"@rsbuild/core": "1.5.
|
|
55
|
+
"@rsbuild/core": "1.5.2",
|
|
56
56
|
"@rsbuild/plugin-css-minimizer": "1.0.3",
|
|
57
57
|
"@rsdoctor/rspack-plugin": "1.2.3"
|
|
58
58
|
},
|