@lynx-js/rspeedy-canary 0.10.1-canary-20250709-e259aee3 → 0.10.1-canary-20250709-ae7748a0
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 +4 -2
- package/dist/index.js +5 -0
- package/dist/src_cli_build_ts.js +5 -0
- package/dist/src_cli_dev_ts.js +5 -0
- package/dist/src_cli_inspect_ts.js +6 -1
- package/dist/src_cli_preview_ts.js +5 -0
- package/dist/src_plugins_api_plugin_ts.js +2 -2
- package/dist/src_plugins_index_ts.js +1 -1
- package/dist/src_plugins_rsdoctor_plugin_ts.js +7 -13
- package/dist/src_plugins_swc_plugin_ts.js +8 -5
- package/dist/src_plugins_target_plugin_ts.js +5 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
# @lynx-js/rspeedy
|
|
2
2
|
|
|
3
|
-
## 0.10.1-canary-
|
|
3
|
+
## 0.10.1-canary-20250709043603-ae7748a005172f2b1fdd78bdece720020c396440
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
|
+
- Fix `rspeedy build --mode development` failed. ([#1252](https://github.com/lynx-family/lynx-stack/pull/1252))
|
|
8
|
+
|
|
7
9
|
- Bump Rsbuild v1.4.5 with Rspack v1.4.5 ([#1239](https://github.com/lynx-family/lynx-stack/pull/1239))
|
|
8
10
|
|
|
9
11
|
- Updated dependencies [[`0a3c89d`](https://github.com/lynx-family/lynx-stack/commit/0a3c89d5776009d1f32d444e77be834fa2b79645)]:
|
|
10
|
-
- @lynx-js/webpack-dev-transport@0.2.0-canary-
|
|
12
|
+
- @lynx-js/webpack-dev-transport@0.2.0-canary-20250709043603-ae7748a005172f2b1fdd78bdece720020c396440
|
|
11
13
|
|
|
12
14
|
## 0.10.0
|
|
13
15
|
|
package/dist/index.js
CHANGED
|
@@ -255,6 +255,11 @@ var external_node_path_ = __webpack_require__("node:path");
|
|
|
255
255
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
256
256
|
function applyDefaultRspeedyConfig(config) {
|
|
257
257
|
const ret = (0, core_.mergeRsbuildConfig)({
|
|
258
|
+
mode: (()=>{
|
|
259
|
+
if (config.mode) return config.mode;
|
|
260
|
+
const nodeEnv = process.env['NODE_ENV'];
|
|
261
|
+
return 'production' === nodeEnv || 'development' === nodeEnv ? nodeEnv : 'none';
|
|
262
|
+
})(),
|
|
258
263
|
output: {
|
|
259
264
|
filename: getFilename(config.output?.filename),
|
|
260
265
|
inlineScripts: true
|
package/dist/src_cli_build_ts.js
CHANGED
|
@@ -142,6 +142,11 @@ export const __webpack_modules__ = {
|
|
|
142
142
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
143
143
|
function applyDefaultRspeedyConfig(config) {
|
|
144
144
|
const ret = (0, core_.mergeRsbuildConfig)({
|
|
145
|
+
mode: (()=>{
|
|
146
|
+
if (config.mode) return config.mode;
|
|
147
|
+
const nodeEnv = process.env['NODE_ENV'];
|
|
148
|
+
return 'production' === nodeEnv || 'development' === nodeEnv ? nodeEnv : 'none';
|
|
149
|
+
})(),
|
|
145
150
|
output: {
|
|
146
151
|
filename: getFilename(config.output?.filename),
|
|
147
152
|
inlineScripts: true
|
package/dist/src_cli_dev_ts.js
CHANGED
|
@@ -185,6 +185,11 @@ export const __webpack_modules__ = {
|
|
|
185
185
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
186
186
|
function applyDefaultRspeedyConfig(config) {
|
|
187
187
|
const ret = (0, core_.mergeRsbuildConfig)({
|
|
188
|
+
mode: (()=>{
|
|
189
|
+
if (config.mode) return config.mode;
|
|
190
|
+
const nodeEnv = process.env['NODE_ENV'];
|
|
191
|
+
return 'production' === nodeEnv || 'development' === nodeEnv ? nodeEnv : 'none';
|
|
192
|
+
})(),
|
|
188
193
|
output: {
|
|
189
194
|
filename: getFilename(config.output?.filename),
|
|
190
195
|
inlineScripts: true
|
|
@@ -125,7 +125,7 @@ export const __webpack_modules__ = {
|
|
|
125
125
|
const { createRspeedyOptions } = await (0, _init_js__WEBPACK_IMPORTED_MODULE_3__.S)(cwd, inspectOptions);
|
|
126
126
|
const rspeedy = await (0, _create_rspeedy_js__WEBPACK_IMPORTED_MODULE_2__.S)(createRspeedyOptions);
|
|
127
127
|
await rspeedy.inspectConfig({
|
|
128
|
-
mode: inspectOptions.mode ??
|
|
128
|
+
mode: inspectOptions.mode ?? rspeedy.getRspeedyConfig().mode ?? 'development',
|
|
129
129
|
verbose: inspectOptions.verbose ?? false,
|
|
130
130
|
outputPath: inspectOptions.output,
|
|
131
131
|
writeToDisk: true
|
|
@@ -145,6 +145,11 @@ export const __webpack_modules__ = {
|
|
|
145
145
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
146
146
|
function applyDefaultRspeedyConfig(config) {
|
|
147
147
|
const ret = (0, core_.mergeRsbuildConfig)({
|
|
148
|
+
mode: (()=>{
|
|
149
|
+
if (config.mode) return config.mode;
|
|
150
|
+
const nodeEnv = process.env['NODE_ENV'];
|
|
151
|
+
return 'production' === nodeEnv || 'development' === nodeEnv ? nodeEnv : 'none';
|
|
152
|
+
})(),
|
|
148
153
|
output: {
|
|
149
154
|
filename: getFilename(config.output?.filename),
|
|
150
155
|
inlineScripts: true
|
|
@@ -147,6 +147,11 @@ export const __webpack_modules__ = {
|
|
|
147
147
|
var core_ = __webpack_require__("@rsbuild/core");
|
|
148
148
|
function applyDefaultRspeedyConfig(config) {
|
|
149
149
|
const ret = (0, core_.mergeRsbuildConfig)({
|
|
150
|
+
mode: (()=>{
|
|
151
|
+
if (config.mode) return config.mode;
|
|
152
|
+
const nodeEnv = process.env['NODE_ENV'];
|
|
153
|
+
return 'production' === nodeEnv || 'development' === nodeEnv ? nodeEnv : 'none';
|
|
154
|
+
})(),
|
|
150
155
|
output: {
|
|
151
156
|
filename: getFilename(config.output?.filename),
|
|
152
157
|
inlineScripts: true
|
|
@@ -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
|
};
|
|
@@ -43,7 +43,7 @@ export const __webpack_modules__ = {
|
|
|
43
43
|
rsbuildInstance.addPlugins(plugins);
|
|
44
44
|
})
|
|
45
45
|
];
|
|
46
|
-
if ('development' ===
|
|
46
|
+
if ('development' === config.mode) {
|
|
47
47
|
(0, _debug_js__WEBPACK_IMPORTED_MODULE_0__.fF)('apply Rspeedy default development plugins');
|
|
48
48
|
promises.push(applyDefaultDevPlugins(rsbuildInstance, config));
|
|
49
49
|
}
|
|
@@ -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
|
};
|
|
@@ -12,15 +12,18 @@ export const __webpack_modules__ = {
|
|
|
12
12
|
return {
|
|
13
13
|
name: 'lynx:rsbuild:swc',
|
|
14
14
|
setup (api) {
|
|
15
|
-
api.modifyRsbuildConfig((config, { mergeRsbuildConfig })=>
|
|
15
|
+
api.modifyRsbuildConfig((config, { mergeRsbuildConfig })=>{
|
|
16
|
+
const isProd = 'production' === config.mode;
|
|
17
|
+
return mergeRsbuildConfig(config, {
|
|
16
18
|
tools: {
|
|
17
19
|
swc (config) {
|
|
18
20
|
delete config.env;
|
|
19
21
|
config.jsc ??= {};
|
|
20
|
-
config.jsc.target = (0, _utils_getESVersionTarget_js__WEBPACK_IMPORTED_MODULE_0__.U)();
|
|
22
|
+
config.jsc.target = (0, _utils_getESVersionTarget_js__WEBPACK_IMPORTED_MODULE_0__.U)(isProd);
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
|
-
})
|
|
25
|
+
});
|
|
26
|
+
});
|
|
24
27
|
}
|
|
25
28
|
};
|
|
26
29
|
}
|
|
@@ -29,8 +32,8 @@ export const __webpack_modules__ = {
|
|
|
29
32
|
__webpack_require__.d(__webpack_exports__, {
|
|
30
33
|
U: ()=>getESVersionTarget
|
|
31
34
|
});
|
|
32
|
-
function getESVersionTarget() {
|
|
33
|
-
return
|
|
35
|
+
function getESVersionTarget(isProd) {
|
|
36
|
+
return isProd ? 'es2015' : 'es2019';
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
};
|
|
@@ -13,13 +13,13 @@ export const __webpack_modules__ = {
|
|
|
13
13
|
return {
|
|
14
14
|
name: 'lynx:rsbuild:target',
|
|
15
15
|
setup (api) {
|
|
16
|
-
api.modifyBundlerChain((options, { environment })=>{
|
|
16
|
+
api.modifyBundlerChain((options, { environment, isProd })=>{
|
|
17
17
|
if ((0, _utils_is_web_js__WEBPACK_IMPORTED_MODULE_1__.$)(environment)) options.target([
|
|
18
|
-
(0, _utils_getESVersionTarget_js__WEBPACK_IMPORTED_MODULE_0__.U)(),
|
|
18
|
+
(0, _utils_getESVersionTarget_js__WEBPACK_IMPORTED_MODULE_0__.U)(isProd),
|
|
19
19
|
'web'
|
|
20
20
|
]);
|
|
21
21
|
else options.target([
|
|
22
|
-
(0, _utils_getESVersionTarget_js__WEBPACK_IMPORTED_MODULE_0__.U)()
|
|
22
|
+
(0, _utils_getESVersionTarget_js__WEBPACK_IMPORTED_MODULE_0__.U)(isProd)
|
|
23
23
|
]);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
@@ -30,8 +30,8 @@ export const __webpack_modules__ = {
|
|
|
30
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
31
31
|
U: ()=>getESVersionTarget
|
|
32
32
|
});
|
|
33
|
-
function getESVersionTarget() {
|
|
34
|
-
return
|
|
33
|
+
function getESVersionTarget(isProd) {
|
|
34
|
+
return isProd ? 'es2015' : 'es2019';
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"./src/utils/is-web.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/rspeedy-canary",
|
|
3
|
-
"version": "0.10.1-canary-20250709-
|
|
3
|
+
"version": "0.10.1-canary-20250709-ae7748a0",
|
|
4
4
|
"description": "A webpack/rspack-based frontend toolchain for Lynx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"webpack",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
],
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@lynx-js/chunk-loading-webpack-plugin": "npm:@lynx-js/chunk-loading-webpack-plugin-canary@0.3.0",
|
|
50
|
-
"@lynx-js/webpack-dev-transport": "npm:@lynx-js/webpack-dev-transport-canary@0.2.0-canary-20250709-
|
|
50
|
+
"@lynx-js/webpack-dev-transport": "npm:@lynx-js/webpack-dev-transport-canary@0.2.0-canary-20250709-ae7748a0",
|
|
51
51
|
"@lynx-js/websocket": "npm:@lynx-js/websocket-canary@0.0.4",
|
|
52
52
|
"@rsbuild/core": "1.4.5",
|
|
53
53
|
"@rsbuild/plugin-css-minimizer": "1.0.2",
|