@lynx-js/rspeedy-canary 0.9.6 → 0.9.7-canary-20250526-0d948847
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 +38 -32
- package/dist/cli/main.js +6 -6
- package/dist/index.js +1 -0
- package/dist/src_cli_build_ts.js +1 -0
- package/dist/src_cli_dev_ts.js +1 -0
- package/dist/src_cli_inspect_ts.js +1 -0
- package/dist/src_cli_preview_ts.js +1 -0
- package/dist/src_plugins_api_plugin_ts.js +2 -2
- package/dist/src_plugins_rsdoctor_plugin_ts.js +7 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
+
## 0.9.7-canary-20250526083207-0d948847fe6ec9b458056ef97453efa7bc5416fa
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The default value of `output.inlineScripts` should be `true`. ([#910](https://github.com/lynx-family/lynx-stack/pull/910))
|
|
8
|
+
|
|
3
9
|
## 0.9.6
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -11,13 +17,13 @@
|
|
|
11
17
|
example:
|
|
12
18
|
|
|
13
19
|
```js
|
|
14
|
-
import { defineConfig } from
|
|
20
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
15
21
|
|
|
16
22
|
export default defineConfig({
|
|
17
23
|
output: {
|
|
18
24
|
inlineScripts: false,
|
|
19
25
|
},
|
|
20
|
-
})
|
|
26
|
+
});
|
|
21
27
|
```
|
|
22
28
|
|
|
23
29
|
- Bump Rsbuild v1.3.21 with Rspack v1.3.11. ([#863](https://github.com/lynx-family/lynx-stack/pull/863))
|
|
@@ -37,12 +43,12 @@
|
|
|
37
43
|
example:
|
|
38
44
|
|
|
39
45
|
```js
|
|
40
|
-
import { defineConfig } from
|
|
46
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
41
47
|
export default defineConfig({
|
|
42
48
|
source: {
|
|
43
|
-
preEntry:
|
|
49
|
+
preEntry: "./src/polyfill.ts",
|
|
44
50
|
},
|
|
45
|
-
})
|
|
51
|
+
});
|
|
46
52
|
```
|
|
47
53
|
|
|
48
54
|
- Bump Rsbuild v1.3.20 with Rspack v1.3.10. ([#799](https://github.com/lynx-family/lynx-stack/pull/799))
|
|
@@ -53,17 +59,17 @@
|
|
|
53
59
|
|
|
54
60
|
```js
|
|
55
61
|
export const myPlugin = {
|
|
56
|
-
name:
|
|
62
|
+
name: "my-plugin",
|
|
57
63
|
setup(api) {
|
|
58
|
-
const { callerName } = api.context
|
|
64
|
+
const { callerName } = api.context;
|
|
59
65
|
|
|
60
|
-
if (callerName ===
|
|
66
|
+
if (callerName === "rslib") {
|
|
61
67
|
// ...
|
|
62
|
-
} else if (callerName ===
|
|
68
|
+
} else if (callerName === "rspeedy") {
|
|
63
69
|
// ...
|
|
64
70
|
}
|
|
65
71
|
},
|
|
66
|
-
}
|
|
72
|
+
};
|
|
67
73
|
```
|
|
68
74
|
|
|
69
75
|
- Support `performance.buildCache`. ([#766](https://github.com/lynx-family/lynx-stack/pull/766))
|
|
@@ -86,7 +92,7 @@
|
|
|
86
92
|
Set `tools.rsdoctor.experiments.enableNativePlugin` to `false` to use the old JS plugin.
|
|
87
93
|
|
|
88
94
|
```js
|
|
89
|
-
import { defineConfig } from
|
|
95
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
90
96
|
|
|
91
97
|
export default defineConfig({
|
|
92
98
|
tools: {
|
|
@@ -96,7 +102,7 @@
|
|
|
96
102
|
},
|
|
97
103
|
},
|
|
98
104
|
},
|
|
99
|
-
})
|
|
105
|
+
});
|
|
100
106
|
```
|
|
101
107
|
|
|
102
108
|
See [Rsdoctor - 1.0](https://rsdoctor.dev/blog/release/release-note-1_0#-faster-analysis) for more details.
|
|
@@ -228,12 +234,12 @@
|
|
|
228
234
|
example:
|
|
229
235
|
|
|
230
236
|
```js
|
|
231
|
-
import { defineConfig } from
|
|
237
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
232
238
|
export default defineConfig({
|
|
233
239
|
server: {
|
|
234
|
-
base:
|
|
240
|
+
base: "/dist",
|
|
235
241
|
},
|
|
236
|
-
})
|
|
242
|
+
});
|
|
237
243
|
```
|
|
238
244
|
|
|
239
245
|
- Updated dependencies [[`b026c8b`](https://github.com/lynx-family/lynx-stack/commit/b026c8bdcbf7bdcda73e170477297213b447d876)]:
|
|
@@ -286,11 +292,11 @@
|
|
|
286
292
|
You can switch to other tools by using:
|
|
287
293
|
|
|
288
294
|
```js
|
|
289
|
-
import { defineConfig } from
|
|
295
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
290
296
|
import {
|
|
291
297
|
CssMinimizerWebpackPlugin,
|
|
292
298
|
pluginCssMinimizer,
|
|
293
|
-
} from
|
|
299
|
+
} from "@rsbuild/plugin-css-minimizer";
|
|
294
300
|
|
|
295
301
|
export default defineConfig({
|
|
296
302
|
plugins: [
|
|
@@ -303,7 +309,7 @@
|
|
|
303
309
|
},
|
|
304
310
|
}),
|
|
305
311
|
],
|
|
306
|
-
})
|
|
312
|
+
});
|
|
307
313
|
```
|
|
308
314
|
|
|
309
315
|
See [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) for details.
|
|
@@ -313,8 +319,8 @@
|
|
|
313
319
|
You can use custom options with [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer):
|
|
314
320
|
|
|
315
321
|
```js
|
|
316
|
-
import { defineConfig } from
|
|
317
|
-
import { pluginCssMinimizer } from
|
|
322
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
323
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
318
324
|
|
|
319
325
|
export default defineConfig({
|
|
320
326
|
plugins: [
|
|
@@ -326,7 +332,7 @@
|
|
|
326
332
|
},
|
|
327
333
|
}),
|
|
328
334
|
],
|
|
329
|
-
})
|
|
335
|
+
});
|
|
330
336
|
```
|
|
331
337
|
|
|
332
338
|
## 0.7.1
|
|
@@ -346,7 +352,7 @@
|
|
|
346
352
|
You may turn it off using `output.minify.css: false`:
|
|
347
353
|
|
|
348
354
|
```js
|
|
349
|
-
import { defineConfig } from
|
|
355
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
350
356
|
|
|
351
357
|
export default defineConfig({
|
|
352
358
|
output: {
|
|
@@ -354,18 +360,18 @@
|
|
|
354
360
|
css: false,
|
|
355
361
|
},
|
|
356
362
|
},
|
|
357
|
-
})
|
|
363
|
+
});
|
|
358
364
|
```
|
|
359
365
|
|
|
360
366
|
Or you may use [@rsbuild/plugin-css-minimizer](https://github.com/rspack-contrib/rsbuild-plugin-css-minimizer) to use `cssnano` as CSS minimizer.
|
|
361
367
|
|
|
362
368
|
```js
|
|
363
|
-
import { defineConfig } from
|
|
364
|
-
import { pluginCssMinimizer } from
|
|
369
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
370
|
+
import { pluginCssMinimizer } from "@rsbuild/plugin-css-minimizer";
|
|
365
371
|
|
|
366
372
|
export default defineConfig({
|
|
367
373
|
plugins: [pluginCssMinimizer()],
|
|
368
|
-
})
|
|
374
|
+
});
|
|
369
375
|
```
|
|
370
376
|
|
|
371
377
|
- 525554c: **BREAKING CHANGE**: Bump ts-blank-space to ^0.6.0.
|
|
@@ -392,22 +398,22 @@
|
|
|
392
398
|
- The new `type: 'reload-server'` will restart the development server when it detects changes in the specified files.
|
|
393
399
|
|
|
394
400
|
```js
|
|
395
|
-
import { defineConfig } from
|
|
401
|
+
import { defineConfig } from "@lynx-js/rspeedy";
|
|
396
402
|
|
|
397
403
|
export default defineConfig({
|
|
398
404
|
dev: {
|
|
399
405
|
watchFiles: [
|
|
400
406
|
{
|
|
401
|
-
type:
|
|
402
|
-
paths: [
|
|
407
|
+
type: "reload-server",
|
|
408
|
+
paths: ["public/**/*.txt"],
|
|
403
409
|
},
|
|
404
410
|
{
|
|
405
|
-
type:
|
|
406
|
-
paths: [
|
|
411
|
+
type: "reload-page",
|
|
412
|
+
paths: ["public/**/*.json"],
|
|
407
413
|
},
|
|
408
414
|
],
|
|
409
415
|
},
|
|
410
|
-
})
|
|
416
|
+
});
|
|
411
417
|
```
|
|
412
418
|
|
|
413
419
|
- be9b003: Add `source.exclude`.
|
package/dist/cli/main.js
CHANGED
|
@@ -194,9 +194,9 @@ var __webpack_modules__ = {
|
|
|
194
194
|
NW: ()=>debugList,
|
|
195
195
|
fF: ()=>debug
|
|
196
196
|
});
|
|
197
|
-
var
|
|
198
|
-
var
|
|
199
|
-
var
|
|
197
|
+
var _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("@rsbuild/core");
|
|
198
|
+
var picocolors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js");
|
|
199
|
+
var picocolors__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__.n(picocolors__WEBPACK_IMPORTED_MODULE_1__);
|
|
200
200
|
const isDebug = ()=>{
|
|
201
201
|
if (!process.env['DEBUG']) return false;
|
|
202
202
|
const values = process.env['DEBUG'].toLocaleLowerCase().split(',');
|
|
@@ -206,12 +206,12 @@ var __webpack_modules__ = {
|
|
|
206
206
|
'*'
|
|
207
207
|
].some((key)=>values.includes(key));
|
|
208
208
|
};
|
|
209
|
-
const label =
|
|
209
|
+
const label = picocolors__WEBPACK_IMPORTED_MODULE_1___default().bgCyan('lynx');
|
|
210
210
|
const debug = (message)=>{
|
|
211
211
|
if (isDebug()) {
|
|
212
212
|
const result = 'string' == typeof message ? message : message();
|
|
213
|
-
|
|
214
|
-
|
|
213
|
+
_rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.logger.level = 'verbose';
|
|
214
|
+
_rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.logger.debug(`${label} ${result}`);
|
|
215
215
|
}
|
|
216
216
|
};
|
|
217
217
|
const debugList = (prefix, messages)=>debug(()=>`${prefix} ${[
|
package/dist/index.js
CHANGED
|
@@ -344,6 +344,7 @@ function toRsbuildConfig(config) {
|
|
|
344
344
|
dataUriLimit: config.output?.dataUriLimit ?? defaultDataUriLimit,
|
|
345
345
|
distPath: config.output?.distPath,
|
|
346
346
|
filenameHash: config.output?.filenameHash,
|
|
347
|
+
inlineScripts: config.output?.inlineScripts,
|
|
347
348
|
legalComments: config.output?.legalComments ?? 'none',
|
|
348
349
|
polyfill: 'off',
|
|
349
350
|
sourceMap: config.output?.sourceMap
|
package/dist/src_cli_build_ts.js
CHANGED
|
@@ -231,6 +231,7 @@ export const __webpack_modules__ = {
|
|
|
231
231
|
dataUriLimit: config.output?.dataUriLimit ?? defaultDataUriLimit,
|
|
232
232
|
distPath: config.output?.distPath,
|
|
233
233
|
filenameHash: config.output?.filenameHash,
|
|
234
|
+
inlineScripts: config.output?.inlineScripts,
|
|
234
235
|
legalComments: config.output?.legalComments ?? 'none',
|
|
235
236
|
polyfill: 'off',
|
|
236
237
|
sourceMap: config.output?.sourceMap
|
package/dist/src_cli_dev_ts.js
CHANGED
|
@@ -274,6 +274,7 @@ export const __webpack_modules__ = {
|
|
|
274
274
|
dataUriLimit: config.output?.dataUriLimit ?? defaultDataUriLimit,
|
|
275
275
|
distPath: config.output?.distPath,
|
|
276
276
|
filenameHash: config.output?.filenameHash,
|
|
277
|
+
inlineScripts: config.output?.inlineScripts,
|
|
277
278
|
legalComments: config.output?.legalComments ?? 'none',
|
|
278
279
|
polyfill: 'off',
|
|
279
280
|
sourceMap: config.output?.sourceMap
|
|
@@ -234,6 +234,7 @@ export const __webpack_modules__ = {
|
|
|
234
234
|
dataUriLimit: config.output?.dataUriLimit ?? defaultDataUriLimit,
|
|
235
235
|
distPath: config.output?.distPath,
|
|
236
236
|
filenameHash: config.output?.filenameHash,
|
|
237
|
+
inlineScripts: config.output?.inlineScripts,
|
|
237
238
|
legalComments: config.output?.legalComments ?? 'none',
|
|
238
239
|
polyfill: 'off',
|
|
239
240
|
sourceMap: config.output?.sourceMap
|
|
@@ -236,6 +236,7 @@ export const __webpack_modules__ = {
|
|
|
236
236
|
dataUriLimit: config.output?.dataUriLimit ?? defaultDataUriLimit,
|
|
237
237
|
distPath: config.output?.distPath,
|
|
238
238
|
filenameHash: config.output?.filenameHash,
|
|
239
|
+
inlineScripts: config.output?.inlineScripts,
|
|
239
240
|
legalComments: config.output?.legalComments ?? 'none',
|
|
240
241
|
polyfill: 'off',
|
|
241
242
|
sourceMap: config.output?.sourceMap
|
|
@@ -19,11 +19,11 @@ export const __webpack_modules__ = {
|
|
|
19
19
|
config,
|
|
20
20
|
debug: _debug_js__WEBPACK_IMPORTED_MODULE_1__.fF,
|
|
21
21
|
async exit (code) {
|
|
22
|
-
const { exit } = await
|
|
22
|
+
const { exit } = await __webpack_require__.e("src_cli_exit_ts").then(__webpack_require__.bind(__webpack_require__, "./src/cli/exit.ts"));
|
|
23
23
|
return exit(code);
|
|
24
24
|
},
|
|
25
25
|
logger: _rsbuild_core__WEBPACK_IMPORTED_MODULE_0__.logger,
|
|
26
|
-
version: _version_js__WEBPACK_IMPORTED_MODULE_2__.
|
|
26
|
+
version: _version_js__WEBPACK_IMPORTED_MODULE_2__.i8
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
};
|
|
@@ -7,8 +7,10 @@ export const __webpack_modules__ = {
|
|
|
7
7
|
__webpack_require__.d(__webpack_exports__, {
|
|
8
8
|
pluginRsdoctor: ()=>pluginRsdoctor
|
|
9
9
|
});
|
|
10
|
-
var
|
|
11
|
-
|
|
10
|
+
var core_ = __webpack_require__("@rsbuild/core");
|
|
11
|
+
function isCI() {
|
|
12
|
+
return !!process.env['CI'] && 'false' !== process.env['CI'];
|
|
13
|
+
}
|
|
12
14
|
function pluginRsdoctor(options) {
|
|
13
15
|
return {
|
|
14
16
|
name: 'lynx:rsbuild:rsdoctor',
|
|
@@ -25,7 +27,7 @@ export const __webpack_modules__ = {
|
|
|
25
27
|
if (registered) continue;
|
|
26
28
|
config.plugins ??= [];
|
|
27
29
|
const defaultOptions = {
|
|
28
|
-
disableClientServer: (
|
|
30
|
+
disableClientServer: isCI(),
|
|
29
31
|
supports: {
|
|
30
32
|
banner: true
|
|
31
33
|
},
|
|
@@ -40,20 +42,12 @@ export const __webpack_modules__ = {
|
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
};
|
|
43
|
-
config.plugins.push(new RsdoctorRspackPlugin((0,
|
|
45
|
+
config.plugins.push(new RsdoctorRspackPlugin((0, core_.mergeRsbuildConfig)(defaultOptions, options)));
|
|
44
46
|
}
|
|
45
|
-
|
|
47
|
+
core_.logger.info("Rsdoctor is enabled.");
|
|
46
48
|
});
|
|
47
49
|
}
|
|
48
50
|
};
|
|
49
51
|
}
|
|
50
|
-
},
|
|
51
|
-
"./src/utils/is-ci.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
52
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
53
|
-
y: ()=>isCI
|
|
54
|
-
});
|
|
55
|
-
function isCI() {
|
|
56
|
-
return !!process.env['CI'] && 'false' !== process.env['CI'];
|
|
57
|
-
}
|
|
58
52
|
}
|
|
59
53
|
};
|