@lynx-js/rspeedy-canary 0.11.3-canary-20250919-f4528d19 → 0.11.3-canary-20250919-8c33d3e1
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 +1 -1
- package/dist/0~src_config_validate_ts.js +40795 -0
- package/dist/0~src_plugins_api_plugin_ts.js +33 -0
- package/dist/0~src_plugins_rsdoctor_plugin_ts.js +54 -0
- package/dist/1~src_plugins_chunkLoading_plugin_ts.js +37 -0
- package/dist/1~src_plugins_dev_plugin_ts.js +144 -0
- package/dist/1~src_plugins_emitOnErrors_plugin_ts.js +22 -0
- package/dist/1~src_plugins_index_ts.js +52 -0
- package/dist/1~src_plugins_inspect_plugin_ts.js +49 -0
- package/dist/1~src_plugins_minify_plugin_ts.js +86 -0
- package/dist/1~src_plugins_optimization_plugin_ts.js +26 -0
- package/dist/1~src_plugins_output_plugin_ts.js +47 -0
- package/dist/1~src_plugins_resolve_plugin_ts.js +22 -0
- package/dist/1~src_plugins_sourcemap_plugin_ts.js +100 -0
- package/dist/1~src_plugins_swc_plugin_ts.js +40 -0
- package/dist/1~src_plugins_target_plugin_ts.js +46 -0
- package/dist/{vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js → 1~vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js} +1 -1
- package/dist/1~vendors-node_modules_pnpm_ipaddr_js_2_2_0_node_modules_ipaddr_js_lib_ipaddr_js.js +1068 -0
- package/dist/1~vendors-node_modules_pnpm_javascript-stringify_2_1_0_node_modules_javascript-stringify_dist_i-562fbc.js +417 -0
- package/dist/cli/main.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- /package/dist/{src_cli_exit_ts.js → 0~src_cli_exit_ts.js} +0 -0
- /package/dist/{src_plugins_chunkLoading_plugin_ts.js → 0~src_plugins_chunkLoading_plugin_ts.js} +0 -0
- /package/dist/{src_plugins_dev_plugin_ts.js → 0~src_plugins_dev_plugin_ts.js} +0 -0
- /package/dist/{src_plugins_emitOnErrors_plugin_ts.js → 0~src_plugins_emitOnErrors_plugin_ts.js} +0 -0
- /package/dist/{src_plugins_index_ts.js → 0~src_plugins_index_ts.js} +0 -0
- /package/dist/{src_plugins_inspect_plugin_ts.js → 0~src_plugins_inspect_plugin_ts.js} +0 -0
- /package/dist/{src_plugins_minify_plugin_ts.js → 0~src_plugins_minify_plugin_ts.js} +0 -0
- /package/dist/{src_plugins_optimization_plugin_ts.js → 0~src_plugins_optimization_plugin_ts.js} +0 -0
- /package/dist/{src_plugins_output_plugin_ts.js → 0~src_plugins_output_plugin_ts.js} +0 -0
- /package/dist/{src_plugins_resolve_plugin_ts.js → 0~src_plugins_resolve_plugin_ts.js} +0 -0
- /package/dist/{src_plugins_sourcemap_plugin_ts.js → 0~src_plugins_sourcemap_plugin_ts.js} +0 -0
- /package/dist/{src_plugins_swc_plugin_ts.js → 0~src_plugins_swc_plugin_ts.js} +0 -0
- /package/dist/{src_plugins_target_plugin_ts.js → 0~src_plugins_target_plugin_ts.js} +0 -0
- /package/dist/{vendors-node_modules_pnpm_ipaddr_js_2_2_0_node_modules_ipaddr_js_lib_ipaddr_js.js → 0~vendors-node_modules_pnpm_ipaddr_js_2_2_0_node_modules_ipaddr_js_lib_ipaddr_js.js} +0 -0
- /package/dist/{vendors-node_modules_pnpm_javascript-stringify_2_1_0_node_modules_javascript-stringify_dist_i-562fbc.js → 0~vendors-node_modules_pnpm_javascript-stringify_2_1_0_node_modules_javascript-stringify_dist_i-562fbc.js} +0 -0
- /package/dist/{events-fs-fs_promises-os-path-stream.js → 1~events-fs-fs_promises-os-path-stream.js} +0 -0
- /package/dist/{node_child_process-node_events-node_fs-node_path.js → 1~node_child_process-node_events-node_fs-node_path.js} +0 -0
- /package/dist/{src_cli_build_ts.js → 1~src_cli_build_ts.js} +0 -0
- /package/dist/{src_cli_commands_ts.js → 1~src_cli_commands_ts.js} +0 -0
- /package/dist/{src_cli_dev_ts.js → 1~src_cli_dev_ts.js} +0 -0
- /package/dist/{src_cli_inspect_ts.js → 1~src_cli_inspect_ts.js} +0 -0
- /package/dist/{src_cli_preview_ts.js → 1~src_cli_preview_ts.js} +0 -0
- /package/dist/{src_config_validate_ts.js → 1~src_config_validate_ts.js} +0 -0
- /package/dist/{src_plugins_api_plugin_ts.js → 1~src_plugins_api_plugin_ts.js} +0 -0
- /package/dist/{src_plugins_rsdoctor_plugin_ts.js → 1~src_plugins_rsdoctor_plugin_ts.js} +0 -0
- /package/dist/{src_version_ts.js → 1~src_version_ts.js} +0 -0
- /package/dist/{vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js.LICENSE.txt → 1~vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js.LICENSE.txt} +0 -0
- /package/dist/{vendors-node_modules_pnpm_commander_13_1_0_node_modules_commander_esm_mjs.js → 1~vendors-node_modules_pnpm_commander_13_1_0_node_modules_commander_esm_mjs.js} +0 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export const __webpack_id__ = "src_plugins_sourcemap_plugin_ts";
|
|
2
|
+
export const __webpack_ids__ = [
|
|
3
|
+
"src_plugins_sourcemap_plugin_ts"
|
|
4
|
+
];
|
|
5
|
+
export const __webpack_modules__ = {
|
|
6
|
+
"./src/plugins/sourcemap.plugin.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
9
|
+
pluginSourcemap: ()=>pluginSourcemap
|
|
10
|
+
});
|
|
11
|
+
var isProduction = 'production' === process.env.NODE_ENV;
|
|
12
|
+
var prefix = 'Invariant failed';
|
|
13
|
+
function invariant(condition, message) {
|
|
14
|
+
if (condition) return;
|
|
15
|
+
if (isProduction) throw new Error(prefix);
|
|
16
|
+
var provided = 'function' == typeof message ? message() : message;
|
|
17
|
+
var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
|
|
18
|
+
throw new Error(value);
|
|
19
|
+
}
|
|
20
|
+
class EvalSourceMapDevToolPlugin_EvalSourceMapDevToolPlugin {
|
|
21
|
+
options;
|
|
22
|
+
constructor(options){
|
|
23
|
+
this.options = options;
|
|
24
|
+
}
|
|
25
|
+
apply(compiler) {
|
|
26
|
+
const { EvalSourceMapDevToolPlugin } = compiler.webpack;
|
|
27
|
+
new EvalSourceMapDevToolPlugin(this.options).apply(compiler);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
class SourceMapDevToolPlugin_SourceMapDevToolPlugin {
|
|
31
|
+
options;
|
|
32
|
+
constructor(options){
|
|
33
|
+
this.options = options;
|
|
34
|
+
}
|
|
35
|
+
apply(compiler) {
|
|
36
|
+
const { SourceMapDevToolPlugin } = compiler.webpack;
|
|
37
|
+
new SourceMapDevToolPlugin(this.options).apply(compiler);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function pluginSourcemap() {
|
|
41
|
+
return {
|
|
42
|
+
name: 'lynx:rsbuild:sourcemap',
|
|
43
|
+
pre: [
|
|
44
|
+
'lynx:rsbuild:dev'
|
|
45
|
+
],
|
|
46
|
+
setup (api) {
|
|
47
|
+
api.modifyBundlerChain((chain, { isDev })=>{
|
|
48
|
+
const { dev, output, server } = api.getRsbuildConfig('current');
|
|
49
|
+
const publicPath = isDev ? dev?.assetPrefix : output?.assetPrefix;
|
|
50
|
+
if (false === publicPath) return;
|
|
51
|
+
invariant('string' == typeof publicPath || void 0 === publicPath, `dev.assetPrefix should be normalized to string, got ${dev?.assetPrefix}`);
|
|
52
|
+
applySourceMapPlugin(chain, getDevtoolFromSourceMap(), publicPath?.replaceAll('<port>', String(api.context.devServer?.port ?? server?.port)));
|
|
53
|
+
function getDevtoolFromSourceMap() {
|
|
54
|
+
const DEFAULT_DEV_DEVTOOL = 'cheap-module-source-map';
|
|
55
|
+
switch(typeof output?.sourceMap){
|
|
56
|
+
case 'boolean':
|
|
57
|
+
if (output.sourceMap) return isDev ? DEFAULT_DEV_DEVTOOL : 'source-map';
|
|
58
|
+
return false;
|
|
59
|
+
case 'undefined':
|
|
60
|
+
case 'object':
|
|
61
|
+
return output?.sourceMap?.js ?? (isDev ? DEFAULT_DEV_DEVTOOL : false);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function applySourceMapPlugin(chain, devtool, publicPath) {
|
|
69
|
+
if (false === devtool) return;
|
|
70
|
+
const CHAIN_ID_DEV_SOURCEMAP = 'lynx:sourcemap';
|
|
71
|
+
const output = chain.get('output');
|
|
72
|
+
if (devtool.includes('source-map')) {
|
|
73
|
+
const hidden = devtool.includes('hidden');
|
|
74
|
+
const inline = devtool.includes('inline');
|
|
75
|
+
const evalWrapped = devtool.includes('eval');
|
|
76
|
+
const cheap = devtool.includes('cheap');
|
|
77
|
+
const moduleMaps = devtool.includes('module');
|
|
78
|
+
const noSources = devtool.includes('nosources');
|
|
79
|
+
const debugIds = devtool.includes('debugids');
|
|
80
|
+
const options = {
|
|
81
|
+
filename: inline ? null : output?.sourceMapFilename ?? '[file].map[query]',
|
|
82
|
+
moduleFilenameTemplate: output?.devtoolModuleFilenameTemplate ?? 'file://[absolute-resource-path]',
|
|
83
|
+
fallbackModuleFilenameTemplate: output?.devtoolFallbackModuleFilenameTemplate ?? 'file://[absolute-resource-path]?[hash]',
|
|
84
|
+
append: hidden ? false : void 0,
|
|
85
|
+
module: moduleMaps ? true : !cheap,
|
|
86
|
+
columns: !cheap,
|
|
87
|
+
noSources,
|
|
88
|
+
namespace: output?.devtoolNamespace,
|
|
89
|
+
publicPath,
|
|
90
|
+
debugIds
|
|
91
|
+
};
|
|
92
|
+
chain.devtool(false).plugin(CHAIN_ID_DEV_SOURCEMAP).when(evalWrapped, (plugin)=>plugin.use(EvalSourceMapDevToolPlugin_EvalSourceMapDevToolPlugin, [
|
|
93
|
+
options
|
|
94
|
+
]), (plugin)=>plugin.use(SourceMapDevToolPlugin_SourceMapDevToolPlugin, [
|
|
95
|
+
options
|
|
96
|
+
]));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export const __webpack_id__ = "src_plugins_swc_plugin_ts";
|
|
2
|
+
export const __webpack_ids__ = [
|
|
3
|
+
"src_plugins_swc_plugin_ts"
|
|
4
|
+
];
|
|
5
|
+
export const __webpack_modules__ = {
|
|
6
|
+
"./src/plugins/swc.plugin.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
9
|
+
pluginSwc: ()=>pluginSwc
|
|
10
|
+
});
|
|
11
|
+
var _utils_getESVersionTarget_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./src/utils/getESVersionTarget.ts");
|
|
12
|
+
function pluginSwc() {
|
|
13
|
+
return {
|
|
14
|
+
name: 'lynx:rsbuild:swc',
|
|
15
|
+
setup (api) {
|
|
16
|
+
api.modifyRsbuildConfig((config, { mergeRsbuildConfig })=>{
|
|
17
|
+
const isProd = 'production' === config.mode;
|
|
18
|
+
return mergeRsbuildConfig(config, {
|
|
19
|
+
tools: {
|
|
20
|
+
swc (config) {
|
|
21
|
+
delete config.env;
|
|
22
|
+
config.jsc ??= {};
|
|
23
|
+
config.jsc.target = (0, _utils_getESVersionTarget_js__WEBPACK_IMPORTED_MODULE_0__.y)(isProd);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"./src/utils/getESVersionTarget.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
33
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
34
|
+
y: ()=>getESVersionTarget
|
|
35
|
+
});
|
|
36
|
+
function getESVersionTarget(isProd) {
|
|
37
|
+
return isProd ? 'es2015' : 'es2019';
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export const __webpack_id__ = "src_plugins_target_plugin_ts";
|
|
2
|
+
export const __webpack_ids__ = [
|
|
3
|
+
"src_plugins_target_plugin_ts"
|
|
4
|
+
];
|
|
5
|
+
export const __webpack_modules__ = {
|
|
6
|
+
"./src/plugins/target.plugin.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
7
|
+
__webpack_require__.r(__webpack_exports__);
|
|
8
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
9
|
+
pluginTarget: ()=>pluginTarget
|
|
10
|
+
});
|
|
11
|
+
var _utils_getESVersionTarget_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./src/utils/getESVersionTarget.ts");
|
|
12
|
+
var _utils_is_web_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./src/utils/is-web.ts");
|
|
13
|
+
function pluginTarget() {
|
|
14
|
+
return {
|
|
15
|
+
name: 'lynx:rsbuild:target',
|
|
16
|
+
setup (api) {
|
|
17
|
+
api.modifyBundlerChain((options, { environment, isProd })=>{
|
|
18
|
+
if ((0, _utils_is_web_js__WEBPACK_IMPORTED_MODULE_1__.H)(environment)) options.target([
|
|
19
|
+
(0, _utils_getESVersionTarget_js__WEBPACK_IMPORTED_MODULE_0__.y)(isProd),
|
|
20
|
+
'web'
|
|
21
|
+
]);
|
|
22
|
+
else options.target([
|
|
23
|
+
(0, _utils_getESVersionTarget_js__WEBPACK_IMPORTED_MODULE_0__.y)(isProd)
|
|
24
|
+
]);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"./src/utils/getESVersionTarget.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
31
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
32
|
+
y: ()=>getESVersionTarget
|
|
33
|
+
});
|
|
34
|
+
function getESVersionTarget(isProd) {
|
|
35
|
+
return isProd ? 'es2015' : 'es2019';
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"./src/utils/is-web.ts": function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
39
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
40
|
+
H: ()=>isWeb
|
|
41
|
+
});
|
|
42
|
+
function isWeb(environment) {
|
|
43
|
+
return 'string' == typeof environment ? 'web' === environment : 'web' === environment.name;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! For license information please see vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js.LICENSE.txt */
|
|
1
|
+
/*! For license information please see 1~vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js.LICENSE.txt */
|
|
2
2
|
export const __webpack_id__ = "vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js";
|
|
3
3
|
export const __webpack_ids__ = [
|
|
4
4
|
"vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js"
|