@lynx-js/rspeedy 0.14.1 → 0.14.2
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 +9 -2
- package/dist/index.d.ts +37 -31
- package/dist/src_cli_main_ts.js +1 -1
- package/dist/src_index_ts.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
+
## 0.14.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @lynx-js/web-rsbuild-server-middleware@0.20.2
|
|
9
|
+
|
|
3
10
|
## 0.14.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -521,7 +528,7 @@
|
|
|
521
528
|
|
|
522
529
|
- Add `callerName` option to `createRspeedy`. ([#757](https://github.com/lynx-family/lynx-stack/pull/757))
|
|
523
530
|
|
|
524
|
-
It can be accessed by Rsbuild plugins through [`api.context.callerName`](https://rsbuild.
|
|
531
|
+
It can be accessed by Rsbuild plugins through [`api.context.callerName`](https://rsbuild.rs/api/javascript-api/instance#contextcallername), and execute different logic based on this identifier.
|
|
525
532
|
|
|
526
533
|
```js
|
|
527
534
|
export const myPlugin = {
|
|
@@ -652,7 +659,7 @@
|
|
|
652
659
|
|
|
653
660
|
- Support `output.distPath.*`. ([#366](https://github.com/lynx-family/lynx-stack/pull/366))
|
|
654
661
|
|
|
655
|
-
See [Rsbuild - distPath](https://rsbuild.
|
|
662
|
+
See [Rsbuild - distPath](https://rsbuild.rs/config/output/dist-path) for all available options.
|
|
656
663
|
|
|
657
664
|
- Support `performance.printFileSize` ([#336](https://github.com/lynx-family/lynx-stack/pull/336))
|
|
658
665
|
|
package/dist/index.d.ts
CHANGED
|
@@ -367,7 +367,7 @@ export declare interface Config {
|
|
|
367
367
|
*
|
|
368
368
|
* If the value of `mode` is `'development'`:
|
|
369
369
|
*
|
|
370
|
-
* - Enable HMR and register the {@link https://rspack.
|
|
370
|
+
* - Enable HMR and register the {@link https://rspack.rs/plugins/webpack/hot-module-replacement-plugin | HotModuleReplacementPlugin}.
|
|
371
371
|
*
|
|
372
372
|
* - Generate JavaScript source maps, but do not generate CSS source maps. See {@link Output.sourceMap} for details.
|
|
373
373
|
*
|
|
@@ -383,7 +383,7 @@ export declare interface Config {
|
|
|
383
383
|
*
|
|
384
384
|
* If the value of `mode` is `'production'`:
|
|
385
385
|
*
|
|
386
|
-
* - Enable JavaScript code minification and register the {@link https://rspack.
|
|
386
|
+
* - Enable JavaScript code minification and register the {@link https://rspack.rs/plugins/rspack/swc-js-minimizer-rspack-plugin | SwcJsMinimizerRspackPlugin}.
|
|
387
387
|
*
|
|
388
388
|
* - Generated JavaScript and CSS filenames will have hash suffixes, see {@link Output.filenameHash}.
|
|
389
389
|
*
|
|
@@ -442,7 +442,7 @@ export declare interface Config {
|
|
|
442
442
|
* @defaultValue undefined
|
|
443
443
|
*
|
|
444
444
|
* @remarks
|
|
445
|
-
* Rspeedy
|
|
445
|
+
* Rspeedy uses the plugin APIs from {@link https://rsbuild.rs/plugins/dev/index | Rsbuild}. See the corresponding document for developing a plugin.
|
|
446
446
|
*/
|
|
447
447
|
plugins?: RsbuildPlugins | undefined;
|
|
448
448
|
}
|
|
@@ -530,9 +530,9 @@ export declare interface CreateRspeedyOptions {
|
|
|
530
530
|
*/
|
|
531
531
|
rspeedyConfig?: Config;
|
|
532
532
|
/**
|
|
533
|
-
* Rspeedy automatically loads the .env file by default, utilizing the [Rsbuild API](https://rsbuild.
|
|
533
|
+
* Rspeedy automatically loads the .env file by default, utilizing the [Rsbuild API](https://rsbuild.rs/api/javascript-api/core#load-env-variables).
|
|
534
534
|
* You can use the environment variables defined in the .env file within your code by accessing them via `import.meta.env.FOO` or `process.env.Foo`.
|
|
535
|
-
* @see https://rsbuild.
|
|
535
|
+
* @see https://rsbuild.rs/guide/advanced/env-vars#env-file
|
|
536
536
|
* @defaultValue true
|
|
537
537
|
*/
|
|
538
538
|
loadEnv?: CreateRsbuildOptions['loadEnv'];
|
|
@@ -540,7 +540,7 @@ export declare interface CreateRspeedyOptions {
|
|
|
540
540
|
* Only build specified environments.
|
|
541
541
|
* For example, passing `['lynx']` will only build the `lynx` environment.
|
|
542
542
|
* If not specified or passing an empty array, all environments will be built.
|
|
543
|
-
* @see https://rsbuild.
|
|
543
|
+
* @see https://rsbuild.rs/guide/advanced/environments#build-specified-environment
|
|
544
544
|
* @defaultValue []
|
|
545
545
|
*/
|
|
546
546
|
environment?: CreateRsbuildOptions['environment'];
|
|
@@ -1127,7 +1127,7 @@ export declare interface Dev {
|
|
|
1127
1127
|
*
|
|
1128
1128
|
* During `rspeedy dev`, if this option is not set to `false`, the dev plugin normalizes it to `http://<detected-host>:<port>/` and appends `server.base` when configured.
|
|
1129
1129
|
*
|
|
1130
|
-
* The functionality of {@link Dev.assetPrefix} is basically the same as the {@link https://
|
|
1130
|
+
* The functionality of {@link Dev.assetPrefix} is basically the same as the {@link https://rspack.rs/config/output#outputpublicpath | output.publicPath}
|
|
1131
1131
|
* config in Rspack. With the following differences:
|
|
1132
1132
|
*
|
|
1133
1133
|
* - `dev.assetPrefix` only takes effect during development.
|
|
@@ -1478,7 +1478,7 @@ export declare type Entry = string | string[] | Record<string, string | string[]
|
|
|
1478
1478
|
* The `EntryDescription` describes a entry. It is useful when the project has multiple entries with different configuration.
|
|
1479
1479
|
*
|
|
1480
1480
|
* @remarks
|
|
1481
|
-
* It is similar with the {@link https://
|
|
1481
|
+
* It is similar with the {@link https://rspack.rs/config/entry#entry-description-object | Entry Description Object} of Rspack.
|
|
1482
1482
|
* But only a few properties that Lynx supports is allowed.
|
|
1483
1483
|
*
|
|
1484
1484
|
* @public
|
|
@@ -1501,7 +1501,7 @@ export declare interface EntryDescription {
|
|
|
1501
1501
|
}
|
|
1502
1502
|
|
|
1503
1503
|
/**
|
|
1504
|
-
* The exposed API of Rspeedy. Can be used in Rsbuild plugin with {@link https://rsbuild.
|
|
1504
|
+
* The exposed API of Rspeedy. Can be used in Rsbuild plugin with {@link https://rsbuild.rs/plugins/dev/core#apiuseexposed | api.useExposed}.
|
|
1505
1505
|
*
|
|
1506
1506
|
* @public
|
|
1507
1507
|
*
|
|
@@ -1835,7 +1835,7 @@ export { logger }
|
|
|
1835
1835
|
*
|
|
1836
1836
|
* @remarks
|
|
1837
1837
|
*
|
|
1838
|
-
* This is actually an alias of {@link https://rsbuild.
|
|
1838
|
+
* This is actually an alias of {@link https://rsbuild.rs/api/javascript-api/core#mergersbuildconfig | mergeRsbuildConfig}.
|
|
1839
1839
|
*
|
|
1840
1840
|
* @public
|
|
1841
1841
|
*/
|
|
@@ -1902,7 +1902,7 @@ export declare interface Minify {
|
|
|
1902
1902
|
*
|
|
1903
1903
|
* @remarks
|
|
1904
1904
|
*
|
|
1905
|
-
* For detailed configurations, please refer to {@link https://rspack.
|
|
1905
|
+
* For detailed configurations, please refer to {@link https://rspack.rs/plugins/rspack/swc-js-minimizer-rspack-plugin | SwcJsMinimizerRspackPlugin}.
|
|
1906
1906
|
*
|
|
1907
1907
|
* @example
|
|
1908
1908
|
*
|
|
@@ -1992,7 +1992,7 @@ export declare interface Output {
|
|
|
1992
1992
|
*
|
|
1993
1993
|
* @remarks
|
|
1994
1994
|
*
|
|
1995
|
-
* The functionality of {@link Output.assetPrefix} is basically the same as the {@link https://
|
|
1995
|
+
* The functionality of {@link Output.assetPrefix} is basically the same as the {@link https://rspack.rs/config/output#outputpublicpath | output.publicPath}
|
|
1996
1996
|
* config in Rspack. With the following differences:
|
|
1997
1997
|
*
|
|
1998
1998
|
* - `output.assetPrefix` only takes effect in the production build.
|
|
@@ -2016,6 +2016,12 @@ export declare interface Output {
|
|
|
2016
2016
|
/**
|
|
2017
2017
|
* The {@link Output.cleanDistPath} option determines whether all files in the output directory (default: `dist`) are removed before the build starts.
|
|
2018
2018
|
*
|
|
2019
|
+
* @remarks
|
|
2020
|
+
*
|
|
2021
|
+
* By default, if the output directory is a subdirectory of the project root path, Rspeedy will automatically clean all files in the build directory.
|
|
2022
|
+
*
|
|
2023
|
+
* When {@link https://rsbuild.rs/config/output/dist-path#root-directory | output.distPath.root} is an external directory or the same as the project root directory, `cleanDistPath` is not enabled by default to prevent accidental deletion of files from other directories.
|
|
2024
|
+
*
|
|
2019
2025
|
* @defaultValue Automatically enabled when `output.distPath.root` is a subdirectory of the project root; otherwise disabled.
|
|
2020
2026
|
*
|
|
2021
2027
|
* @example
|
|
@@ -2051,7 +2057,7 @@ export declare interface Output {
|
|
|
2051
2057
|
*
|
|
2052
2058
|
* @remarks
|
|
2053
2059
|
*
|
|
2054
|
-
* For more options, see {@link https://rspack.
|
|
2060
|
+
* For more options, see {@link https://rspack.rs/plugins/rspack/copy-rspack-plugin | Rspack.CopyRspackPlugin}.
|
|
2055
2061
|
*
|
|
2056
2062
|
* @example
|
|
2057
2063
|
*
|
|
@@ -2197,7 +2203,7 @@ export declare interface Output {
|
|
|
2197
2203
|
*
|
|
2198
2204
|
* @remarks
|
|
2199
2205
|
*
|
|
2200
|
-
* More options can be found at {@link https://rsbuild.
|
|
2206
|
+
* More options can be found at {@link https://rsbuild.rs/config/output/dist-path | Rsbuild - distPath}.
|
|
2201
2207
|
*
|
|
2202
2208
|
* @example
|
|
2203
2209
|
*
|
|
@@ -2289,7 +2295,7 @@ export declare interface Output {
|
|
|
2289
2295
|
*
|
|
2290
2296
|
* @remarks
|
|
2291
2297
|
*
|
|
2292
|
-
* This is different with {@link https://rsbuild.
|
|
2298
|
+
* This is different with {@link https://rsbuild.rs/config/output/inline-scripts | output.inlineScripts } since we normally want to inline scripts in Lynx bundle (`.lynx.bundle`).
|
|
2293
2299
|
*
|
|
2294
2300
|
* There are two points that need to be especially noted:
|
|
2295
2301
|
*
|
|
@@ -2407,7 +2413,7 @@ export declare interface Performance {
|
|
|
2407
2413
|
*/
|
|
2408
2414
|
chunkSplit?: ChunkSplit | ChunkSplitBySize | ChunkSplitCustom | undefined;
|
|
2409
2415
|
/**
|
|
2410
|
-
* Whether capture timing information in the build time and the runtime, the same as the {@link https://rspack.
|
|
2416
|
+
* Whether capture timing information in the build time and the runtime, the same as the {@link https://rspack.rs/config/other-options#profile | profile} config of Rspack.
|
|
2411
2417
|
*
|
|
2412
2418
|
* @defaultValue Rspeedy sets this to `true` when `DEBUG` contains `rspeedy`; otherwise it leaves the option unset.
|
|
2413
2419
|
*
|
|
@@ -2471,7 +2477,7 @@ export declare interface Performance {
|
|
|
2471
2477
|
*
|
|
2472
2478
|
* {@link Performance.printFileSize}
|
|
2473
2479
|
*
|
|
2474
|
-
* See {@link https://rsbuild.
|
|
2480
|
+
* See {@link https://rsbuild.rs/config/performance/print-file-size | Rsbuild - performance.printFileSize} for details.
|
|
2475
2481
|
*
|
|
2476
2482
|
* @example
|
|
2477
2483
|
*
|
|
@@ -2801,7 +2807,7 @@ export declare interface Server {
|
|
|
2801
2807
|
*
|
|
2802
2808
|
* If you want to access lynx bundle through `http://<host>:<port>/foo/main.lynx.bundle`, you can change `server.base` to `/foo`
|
|
2803
2809
|
*
|
|
2804
|
-
* you can refer to {@link https://rsbuild.
|
|
2810
|
+
* you can refer to {@link https://rsbuild.rs/config/server/base | server.base } for more information.
|
|
2805
2811
|
*
|
|
2806
2812
|
* @example
|
|
2807
2813
|
*
|
|
@@ -3012,7 +3018,7 @@ export declare interface Source {
|
|
|
3012
3018
|
* Through the source.assetsInclude config, you can specify additional file types that should be treated as static assets.
|
|
3013
3019
|
* These added static assets are processed using the same rules as the built-in supported static assets。
|
|
3014
3020
|
*
|
|
3015
|
-
* The usage of `source.assetsInclude` is consistent with {@link https://rspack.
|
|
3021
|
+
* The usage of `source.assetsInclude` is consistent with {@link https://rspack.rs/config/module#condition | Condition}
|
|
3016
3022
|
* in Rspack, which supports passing in strings, regular expressions, arrays of conditions, or logical conditions
|
|
3017
3023
|
* to match the module path or assets.
|
|
3018
3024
|
*
|
|
@@ -3208,7 +3214,7 @@ export declare interface Source {
|
|
|
3208
3214
|
* By default, Rsbuild compiles JavaScript files in the current directory and TypeScript/JSX files
|
|
3209
3215
|
* in all directories. Through the `source.exclude` config, you can specify files or directories
|
|
3210
3216
|
* that should be excluded from compilation.
|
|
3211
|
-
* The usage of `source.exclude` is consistent with {@link https://rspack.
|
|
3217
|
+
* The usage of `source.exclude` is consistent with {@link https://rspack.rs/config/module#ruleexclude | Rule.exclude}
|
|
3212
3218
|
* in Rspack, which supports passing in strings or regular expressions to match module paths.
|
|
3213
3219
|
*
|
|
3214
3220
|
* @example
|
|
@@ -3274,7 +3280,7 @@ export declare interface Source {
|
|
|
3274
3280
|
*
|
|
3275
3281
|
* Through the `source.include` config, you can specify directories or modules
|
|
3276
3282
|
* that need to be compiled by Rsbuild.
|
|
3277
|
-
* The usage of `source.include` is consistent with {@link https://rspack.
|
|
3283
|
+
* The usage of `source.include` is consistent with {@link https://rspack.rs/config/module#ruleinclude | Rule.include}
|
|
3278
3284
|
* in Rspack, which supports passing in strings or regular expressions to match the module path.
|
|
3279
3285
|
*
|
|
3280
3286
|
* @example
|
|
@@ -3346,7 +3352,7 @@ export declare interface Source {
|
|
|
3346
3352
|
*
|
|
3347
3353
|
* @remarks
|
|
3348
3354
|
*
|
|
3349
|
-
* See {@link https://rsbuild.
|
|
3355
|
+
* See {@link https://rsbuild.rs/config/source/pre-entry | source.preEntry} for more details.
|
|
3350
3356
|
*
|
|
3351
3357
|
* @example
|
|
3352
3358
|
*
|
|
@@ -3441,7 +3447,7 @@ export declare interface SourceMap {
|
|
|
3441
3447
|
*
|
|
3442
3448
|
* @remarks
|
|
3443
3449
|
*
|
|
3444
|
-
* See {@link https://rspack.
|
|
3450
|
+
* See {@link https://rspack.rs/config/devtool | Rspack - Devtool} for details.
|
|
3445
3451
|
*
|
|
3446
3452
|
* @example
|
|
3447
3453
|
*
|
|
@@ -3503,7 +3509,7 @@ export declare interface SourceMap {
|
|
|
3503
3509
|
*/
|
|
3504
3510
|
export declare interface Tools {
|
|
3505
3511
|
/**
|
|
3506
|
-
* The {@link Tools.bundlerChain} changes the options of {@link https://
|
|
3512
|
+
* The {@link Tools.bundlerChain} changes the options of {@link https://rspack.rs | Rspack} using {@link https://github.com/rspack-contrib/rspack-chain | rspack-chain}.
|
|
3507
3513
|
*
|
|
3508
3514
|
* @defaultValue undefined
|
|
3509
3515
|
*
|
|
@@ -3549,7 +3555,7 @@ export declare interface Tools {
|
|
|
3549
3555
|
*/
|
|
3550
3556
|
cssLoader?: CssLoader | undefined;
|
|
3551
3557
|
/**
|
|
3552
|
-
* The {@link CssExtract} controls the options of {@link https://
|
|
3558
|
+
* The {@link CssExtract} controls the options of {@link https://rspack.rs/plugins/rspack/css-extract-rspack-plugin | CssExtractRspackPlugin}
|
|
3553
3559
|
*
|
|
3554
3560
|
* @defaultValue undefined
|
|
3555
3561
|
*/
|
|
@@ -3582,7 +3588,7 @@ export declare interface Tools {
|
|
|
3582
3588
|
*/
|
|
3583
3589
|
rsdoctor?: RsdoctorRspackPluginOptions | undefined;
|
|
3584
3590
|
/**
|
|
3585
|
-
* The {@link Tools.rspack} controls the options of {@link https://
|
|
3591
|
+
* The {@link Tools.rspack} controls the options of {@link https://rspack.rs/ | Rspack}.
|
|
3586
3592
|
*
|
|
3587
3593
|
* @defaultValue undefined
|
|
3588
3594
|
*
|
|
@@ -3604,7 +3610,7 @@ export declare interface Tools {
|
|
|
3604
3610
|
* })
|
|
3605
3611
|
* ```
|
|
3606
3612
|
*
|
|
3607
|
-
* See {@link https://
|
|
3613
|
+
* See {@link https://rspack.rs/config/index | Rspack - Configuration} for details.
|
|
3608
3614
|
*
|
|
3609
3615
|
* @example
|
|
3610
3616
|
*
|
|
@@ -3625,7 +3631,7 @@ export declare interface Tools {
|
|
|
3625
3631
|
* })
|
|
3626
3632
|
* ```
|
|
3627
3633
|
*
|
|
3628
|
-
* See {@link https://rsbuild.
|
|
3634
|
+
* See {@link https://rsbuild.rs/config/tools/rspack#env | Rsbuild - tools.rspack} for details.
|
|
3629
3635
|
*
|
|
3630
3636
|
* @example
|
|
3631
3637
|
*
|
|
@@ -3647,7 +3653,7 @@ export declare interface Tools {
|
|
|
3647
3653
|
* })
|
|
3648
3654
|
* ```
|
|
3649
3655
|
*
|
|
3650
|
-
* See {@link https://rsbuild.
|
|
3656
|
+
* See {@link https://rsbuild.rs/config/tools/rspack#mergeconfig | Rsbuild - tools.rspack} for details.
|
|
3651
3657
|
*
|
|
3652
3658
|
* @example
|
|
3653
3659
|
*
|
|
@@ -3666,11 +3672,11 @@ export declare interface Tools {
|
|
|
3666
3672
|
* })
|
|
3667
3673
|
* ```
|
|
3668
3674
|
*
|
|
3669
|
-
* See {@link https://rsbuild.
|
|
3675
|
+
* See {@link https://rsbuild.rs/config/tools/rspack#appendplugins | Rsbuild - tools.rspack} for details.
|
|
3670
3676
|
*/
|
|
3671
3677
|
rspack?: ToolsConfig['rspack'] | undefined;
|
|
3672
3678
|
/**
|
|
3673
|
-
* The {@link Tools.swc} controls the options of {@link https://rspack.
|
|
3679
|
+
* The {@link Tools.swc} controls the options of {@link https://rspack.rs/guide/features/builtin-swc-loader | builtin:swc-loader}.
|
|
3674
3680
|
*
|
|
3675
3681
|
* @defaultValue undefined
|
|
3676
3682
|
*/
|
package/dist/src_cli_main_ts.js
CHANGED
|
@@ -192,7 +192,7 @@ async function exit_onExit(signal) {
|
|
|
192
192
|
await Promise.allSettled(exitPromises);
|
|
193
193
|
}
|
|
194
194
|
var package_namespaceObject = {
|
|
195
|
-
rE: "0.14.
|
|
195
|
+
rE: "0.14.2"
|
|
196
196
|
};
|
|
197
197
|
const version_version = package_namespaceObject.rE;
|
|
198
198
|
const rspackVersion = rspack.rspackVersion;
|
package/dist/src_index_ts.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/rspeedy",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.2",
|
|
4
4
|
"description": "A webpack/rspack-based frontend toolchain for Lynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@rsdoctor/rspack-plugin": "1.2.3",
|
|
54
54
|
"@lynx-js/cache-events-webpack-plugin": "^0.0.3",
|
|
55
55
|
"@lynx-js/chunk-loading-webpack-plugin": "^0.3.3",
|
|
56
|
-
"@lynx-js/web-rsbuild-server-middleware": "0.20.
|
|
56
|
+
"@lynx-js/web-rsbuild-server-middleware": "0.20.2",
|
|
57
57
|
"@lynx-js/webpack-dev-transport": "^0.2.0",
|
|
58
58
|
"@lynx-js/websocket": "^0.0.4"
|
|
59
59
|
},
|