@lynx-js/rspeedy-canary 0.13.0-canary-20260105-ec1caf1a → 0.13.0-canary-20260105-03ea61ec

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.
Files changed (66) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/{0~vendors-node_modules_pnpm_ipaddr_js_2_3_0_node_modules_ipaddr_js_lib_ipaddr_js.js → 0~node_modules_pnpm_ipaddr_js_2_3_0_node_modules_ipaddr_js_lib_ipaddr_js.js} +3 -6
  3. package/dist/0~src_cli_exit_ts.js +98 -108
  4. package/dist/0~src_config_output_dist-path_ts.js +2 -0
  5. package/dist/0~src_config_validate_ts.js +41917 -41925
  6. package/dist/0~src_plugins_api_plugin_ts.js +21 -31
  7. package/dist/0~src_plugins_chunkLoading_plugin_ts.js +10 -20
  8. package/dist/0~src_plugins_dev_plugin_ts.js +168 -179
  9. package/dist/0~src_plugins_emitOnErrors_plugin_ts.js +10 -20
  10. package/dist/0~src_plugins_index_ts.js +63 -51
  11. package/dist/0~src_plugins_inspect_plugin_ts.js +434 -39
  12. package/dist/0~src_plugins_minify_plugin_ts.js +66 -76
  13. package/dist/0~src_plugins_optimization_plugin_ts.js +14 -24
  14. package/dist/0~src_plugins_output_plugin_ts.js +29 -45
  15. package/dist/0~src_plugins_resolve_plugin_ts.js +10 -20
  16. package/dist/0~src_plugins_rsdoctor_plugin_ts.js +39 -49
  17. package/dist/0~src_plugins_sourcemap_plugin_ts.js +86 -96
  18. package/dist/0~src_plugins_swc_plugin_ts.js +20 -38
  19. package/dist/0~src_plugins_target_plugin_ts.js +21 -39
  20. package/dist/0~src_utils_getESVersionTarget_ts.js +4 -0
  21. package/dist/1~node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js +1422 -0
  22. package/dist/{1~vendors-node_modules_pnpm_commander_13_1_0_node_modules_commander_esm_mjs.js → 1~node_modules_pnpm_commander_13_1_0_node_modules_commander_esm_mjs.js} +17 -24
  23. package/dist/{1~vendors-node_modules_pnpm_ipaddr_js_2_3_0_node_modules_ipaddr_js_lib_ipaddr_js.js → 1~node_modules_pnpm_ipaddr_js_2_3_0_node_modules_ipaddr_js_lib_ipaddr_js.js} +3 -6
  24. package/dist/1~src_cli_build_ts.js +35 -424
  25. package/dist/1~src_cli_commands_ts.js +56 -74
  26. package/dist/1~src_cli_dev_ts.js +29 -410
  27. package/dist/1~src_cli_init_ts-src_create-rspeedy_ts.js +318 -0
  28. package/dist/1~src_cli_inspect_ts.js +18 -356
  29. package/dist/1~src_cli_preview_ts.js +23 -359
  30. package/dist/1~src_cli_watch_ts.js +39 -0
  31. package/dist/1~src_config_output_dist-path_ts.js +2 -0
  32. package/dist/1~src_config_validate_ts.js +41917 -41925
  33. package/dist/1~src_plugins_api_plugin_ts.js +22 -31
  34. package/dist/1~src_plugins_chunkLoading_plugin_ts.js +10 -20
  35. package/dist/1~src_plugins_dev_plugin_ts.js +170 -179
  36. package/dist/1~src_plugins_emitOnErrors_plugin_ts.js +10 -20
  37. package/dist/1~src_plugins_index_ts.js +63 -51
  38. package/dist/1~src_plugins_inspect_plugin_ts.js +436 -39
  39. package/dist/1~src_plugins_minify_plugin_ts.js +66 -76
  40. package/dist/1~src_plugins_optimization_plugin_ts.js +14 -24
  41. package/dist/1~src_plugins_output_plugin_ts.js +29 -45
  42. package/dist/1~src_plugins_resolve_plugin_ts.js +10 -20
  43. package/dist/1~src_plugins_rsdoctor_plugin_ts.js +37 -55
  44. package/dist/1~src_plugins_sourcemap_plugin_ts.js +86 -96
  45. package/dist/1~src_plugins_swc_plugin_ts.js +20 -38
  46. package/dist/1~src_plugins_target_plugin_ts.js +21 -39
  47. package/dist/1~src_utils_getESVersionTarget_ts.js +4 -0
  48. package/dist/1~src_utils_is-ci_ts.js +4 -0
  49. package/dist/1~src_version_ts.js +6 -18
  50. package/dist/cli/main.js +1 -357
  51. package/dist/cli/start.js +16 -130
  52. package/dist/index.js +1 -524
  53. package/dist/node_fs.js +7 -0
  54. package/dist/node_path.js +7 -0
  55. package/dist/node_url.js +1 -0
  56. package/dist/rslib-runtime.js +75 -0
  57. package/dist/src_cli_main_ts.js +149 -0
  58. package/dist/src_debug_ts.js +93 -0
  59. package/dist/src_index_ts.js +381 -0
  60. package/package.json +1 -1
  61. package/dist/0~vendors-node_modules_pnpm_javascript-stringify_2_1_0_node_modules_javascript-stringify_dist_i-562fbc.js +0 -417
  62. package/dist/1~events-fs-fs_promises-os-path-stream.js +0 -30
  63. package/dist/1~node_child_process-node_events-node_fs-node_path.js +0 -22
  64. package/dist/1~vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js +0 -1432
  65. package/dist/1~vendors-node_modules_pnpm_javascript-stringify_2_1_0_node_modules_javascript-stringify_dist_i-562fbc.js +0 -417
  66. /package/dist/{1~vendors-node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js.LICENSE.txt → 1~node_modules_pnpm_chokidar_4_0_3_node_modules_chokidar_esm_index_js.js.LICENSE.txt} +0 -0
@@ -1,25 +1,15 @@
1
- export const __rspack_esm_id = "src_plugins_optimization_plugin_ts";
2
- export const __rspack_esm_ids = [
3
- "src_plugins_optimization_plugin_ts"
4
- ];
5
- export const __webpack_modules__ = {
6
- "./src/plugins/optimization.plugin.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
7
- __webpack_require__.d(__webpack_exports__, {
8
- pluginOptimization: ()=>pluginOptimization
9
- });
10
- function pluginOptimization() {
11
- return {
12
- name: 'lynx:rsbuild:optimization',
13
- setup (api) {
14
- api.modifyBundlerChain((chain, { CHAIN_ID, isProd })=>{
15
- const rule = chain.module.rules.get(CHAIN_ID.RULE.JS);
16
- chain.module.rule('js-override-strict').type(rule.get('type')).test(rule.get('test')).parser({
17
- overrideStrict: 'strict'
18
- }).end();
19
- if (isProd) chain.optimization.avoidEntryIife(true);
20
- });
21
- }
22
- };
1
+ function pluginOptimization() {
2
+ return {
3
+ name: 'lynx:rsbuild:optimization',
4
+ setup (api) {
5
+ api.modifyBundlerChain((chain, { CHAIN_ID, isProd })=>{
6
+ const rule = chain.module.rules.get(CHAIN_ID.RULE.JS);
7
+ chain.module.rule('js-override-strict').type(rule.get('type')).test(rule.get('test')).parser({
8
+ overrideStrict: 'strict'
9
+ }).end();
10
+ if (isProd) chain.optimization.avoidEntryIife(true);
11
+ });
23
12
  }
24
- }
25
- };
13
+ };
14
+ }
15
+ export { pluginOptimization };
@@ -1,46 +1,30 @@
1
- export const __rspack_esm_id = "src_plugins_output_plugin_ts";
2
- export const __rspack_esm_ids = [
3
- "src_plugins_output_plugin_ts"
4
- ];
5
- export const __webpack_modules__ = {
6
- "./src/config/output/dist-path.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
7
- __webpack_require__.d(__webpack_exports__, {
8
- z: ()=>DEFAULT_DIST_PATH_INTERMEDIATE
9
- });
10
- const DEFAULT_DIST_PATH_INTERMEDIATE = '.rspeedy';
11
- },
12
- "./src/plugins/output.plugin.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
13
- __webpack_require__.d(__webpack_exports__, {
14
- pluginOutput: ()=>pluginOutput
15
- });
16
- var _config_output_dist_path_js__rspack_import_0 = __webpack_require__("./src/config/output/dist-path.ts");
17
- const defaultFilenameOptions = Object.freeze({
18
- css: '[name]/[name].css'
19
- });
20
- const defaultDistPathOptions = Object.freeze({
21
- css: _config_output_dist_path_js__rspack_import_0.z
22
- });
23
- function pluginOutput(options) {
24
- return {
25
- name: 'lynx:rsbuild:output',
26
- setup (api) {
27
- api.modifyRsbuildConfig((config, { mergeRsbuildConfig })=>{
28
- if (!options) return mergeRsbuildConfig({
29
- output: {
30
- filename: {
31
- css: defaultFilenameOptions.css
32
- }
33
- }
34
- }, config);
35
- return mergeRsbuildConfig(config, {
36
- output: {
37
- distPath: Object.assign({}, defaultDistPathOptions, options.distPath),
38
- filename: Object.assign({}, defaultFilenameOptions, options.filename)
39
- }
40
- });
41
- });
42
- }
43
- };
1
+ import { DEFAULT_DIST_PATH_INTERMEDIATE } from "./0~src_config_output_dist-path_ts.js";
2
+ const defaultFilenameOptions = Object.freeze({
3
+ css: '[name]/[name].css'
4
+ });
5
+ const defaultDistPathOptions = Object.freeze({
6
+ css: DEFAULT_DIST_PATH_INTERMEDIATE
7
+ });
8
+ function pluginOutput(options) {
9
+ return {
10
+ name: 'lynx:rsbuild:output',
11
+ setup (api) {
12
+ api.modifyRsbuildConfig((config, { mergeRsbuildConfig })=>{
13
+ if (!options) return mergeRsbuildConfig({
14
+ output: {
15
+ filename: {
16
+ css: defaultFilenameOptions.css
17
+ }
18
+ }
19
+ }, config);
20
+ return mergeRsbuildConfig(config, {
21
+ output: {
22
+ distPath: Object.assign({}, defaultDistPathOptions, options.distPath),
23
+ filename: Object.assign({}, defaultFilenameOptions, options.filename)
24
+ }
25
+ });
26
+ });
44
27
  }
45
- }
46
- };
28
+ };
29
+ }
30
+ export { pluginOutput };
@@ -1,21 +1,11 @@
1
- export const __rspack_esm_id = "src_plugins_resolve_plugin_ts";
2
- export const __rspack_esm_ids = [
3
- "src_plugins_resolve_plugin_ts"
4
- ];
5
- export const __webpack_modules__ = {
6
- "./src/plugins/resolve.plugin.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
7
- __webpack_require__.d(__webpack_exports__, {
8
- pluginResolve: ()=>pluginResolve
9
- });
10
- function pluginResolve() {
11
- return {
12
- name: 'lynx:rsbuild:resolve',
13
- setup (api) {
14
- api.modifyBundlerChain((chain)=>{
15
- chain.resolve.aliasFields.add('browser').end().conditionNames.add('lynx').add('import').add('require').add('browser').end().extensions.add('.cjs').end().mainFields.add('lynx').add('module').add('main').end().mainFiles.add('index.lynx').add('index').end().end().end();
16
- });
17
- }
18
- };
1
+ function pluginResolve() {
2
+ return {
3
+ name: 'lynx:rsbuild:resolve',
4
+ setup (api) {
5
+ api.modifyBundlerChain((chain)=>{
6
+ chain.resolve.aliasFields.add('browser').end().conditionNames.add('lynx').add('import').add('require').add('browser').end().extensions.add('.cjs').end().mainFields.add('lynx').add('module').add('main').end().mainFiles.add('index.lynx').add('index').end().end().end();
7
+ });
19
8
  }
20
- }
21
- };
9
+ };
10
+ }
11
+ export { pluginResolve };
@@ -1,53 +1,43 @@
1
- export const __rspack_esm_id = "src_plugins_rsdoctor_plugin_ts";
2
- export const __rspack_esm_ids = [
3
- "src_plugins_rsdoctor_plugin_ts"
4
- ];
5
- export const __webpack_modules__ = {
6
- "./src/plugins/rsdoctor.plugin.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
7
- __webpack_require__.d(__webpack_exports__, {
8
- pluginRsdoctor: ()=>pluginRsdoctor
9
- });
10
- var core_ = __webpack_require__("@rsbuild/core");
11
- function isCI() {
12
- return !!process.env['CI'] && 'false' !== process.env['CI'];
13
- }
14
- function pluginRsdoctor(options) {
15
- return {
16
- name: 'lynx:rsbuild:rsdoctor',
17
- remove: [
18
- 'rsbuild:rsdoctor'
19
- ],
20
- setup (api) {
21
- if ('true' !== process.env['RSDOCTOR']) return;
22
- api.onBeforeCreateCompiler(async ({ bundlerConfigs })=>{
23
- const { RsdoctorRspackPlugin } = await import("@rsdoctor/rspack-plugin");
24
- for (const config of bundlerConfigs){
25
- const pluginName = 'RsdoctorRspackPlugin';
26
- const registered = config.plugins?.some((plugin)=>'object' == typeof plugin && plugin?.['isRsdoctorPlugin'] === true || plugin?.constructor?.name === pluginName);
27
- if (registered) continue;
28
- config.plugins ??= [];
29
- const defaultOptions = {
30
- disableClientServer: isCI(),
31
- supports: {
32
- banner: true
33
- },
34
- linter: {
35
- rules: {
36
- 'ecma-version-check': options?.linter?.rules?.['ecma-version-check'] ?? [
37
- 'Warn',
38
- {
39
- ecmaVersion: 2019
40
- }
41
- ]
1
+ import { mergeRsbuildConfig, logger } from "./src_index_ts.js";
2
+ function isCI() {
3
+ return !!process.env['CI'] && 'false' !== process.env['CI'];
4
+ }
5
+ function pluginRsdoctor(options) {
6
+ return {
7
+ name: 'lynx:rsbuild:rsdoctor',
8
+ remove: [
9
+ 'rsbuild:rsdoctor'
10
+ ],
11
+ setup (api) {
12
+ if ('true' !== process.env['RSDOCTOR']) return;
13
+ api.onBeforeCreateCompiler(async ({ bundlerConfigs })=>{
14
+ const { RsdoctorRspackPlugin } = await import("@rsdoctor/rspack-plugin");
15
+ for (const config of bundlerConfigs){
16
+ const pluginName = 'RsdoctorRspackPlugin';
17
+ const registered = config.plugins?.some((plugin)=>'object' == typeof plugin && plugin?.['isRsdoctorPlugin'] === true || plugin?.constructor?.name === pluginName);
18
+ if (registered) continue;
19
+ config.plugins ??= [];
20
+ const defaultOptions = {
21
+ disableClientServer: isCI(),
22
+ supports: {
23
+ banner: true
24
+ },
25
+ linter: {
26
+ rules: {
27
+ 'ecma-version-check': options?.linter?.rules?.['ecma-version-check'] ?? [
28
+ 'Warn',
29
+ {
30
+ ecmaVersion: 2019
42
31
  }
43
- }
44
- };
45
- config.plugins.push(new RsdoctorRspackPlugin((0, core_.mergeRsbuildConfig)(defaultOptions, options)));
32
+ ]
33
+ }
46
34
  }
47
- core_.logger.info("Rsdoctor is enabled.");
48
- });
35
+ };
36
+ config.plugins.push(new RsdoctorRspackPlugin(mergeRsbuildConfig(defaultOptions, options)));
49
37
  }
50
- };
38
+ logger.info("Rsdoctor is enabled.");
39
+ });
51
40
  }
52
- }
53
- };
41
+ };
42
+ }
43
+ export { pluginRsdoctor };
@@ -1,99 +1,89 @@
1
- export const __rspack_esm_id = "src_plugins_sourcemap_plugin_ts";
2
- export const __rspack_esm_ids = [
3
- "src_plugins_sourcemap_plugin_ts"
4
- ];
5
- export const __webpack_modules__ = {
6
- "./src/plugins/sourcemap.plugin.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
7
- __webpack_require__.d(__webpack_exports__, {
8
- pluginSourcemap: ()=>pluginSourcemap
9
- });
10
- var isProduction = 'production' === process.env.NODE_ENV;
11
- var prefix = 'Invariant failed';
12
- function invariant(condition, message) {
13
- if (condition) return;
14
- if (isProduction) throw new Error(prefix);
15
- var provided = 'function' == typeof message ? message() : message;
16
- var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
17
- throw new Error(value);
18
- }
19
- class EvalSourceMapDevToolPlugin_EvalSourceMapDevToolPlugin {
20
- options;
21
- constructor(options){
22
- this.options = options;
23
- }
24
- apply(compiler) {
25
- const { EvalSourceMapDevToolPlugin } = compiler.webpack;
26
- new EvalSourceMapDevToolPlugin(this.options).apply(compiler);
27
- }
28
- }
29
- class SourceMapDevToolPlugin_SourceMapDevToolPlugin {
30
- options;
31
- constructor(options){
32
- this.options = options;
33
- }
34
- apply(compiler) {
35
- const { SourceMapDevToolPlugin } = compiler.webpack;
36
- new SourceMapDevToolPlugin(this.options).apply(compiler);
37
- }
38
- }
39
- function pluginSourcemap() {
40
- return {
41
- name: 'lynx:rsbuild:sourcemap',
42
- pre: [
43
- 'lynx:rsbuild:dev'
44
- ],
45
- setup (api) {
46
- api.modifyBundlerChain((chain, { isDev })=>{
47
- const { dev, output, server } = api.getRsbuildConfig('current');
48
- const publicPath = isDev ? dev?.assetPrefix : output?.assetPrefix;
49
- if (false === publicPath) return;
50
- invariant('string' == typeof publicPath || void 0 === publicPath, `dev.assetPrefix should be normalized to string, got ${dev?.assetPrefix}`);
51
- applySourceMapPlugin(chain, getDevtoolFromSourceMap(), publicPath?.replaceAll('<port>', String(api.context.devServer?.port ?? server?.port)));
52
- function getDevtoolFromSourceMap() {
53
- const DEFAULT_DEV_DEVTOOL = 'cheap-module-source-map';
54
- switch(typeof output?.sourceMap){
55
- case 'boolean':
56
- if (output.sourceMap) return isDev ? DEFAULT_DEV_DEVTOOL : 'source-map';
57
- return false;
58
- case 'undefined':
59
- case 'object':
60
- return output?.sourceMap?.js ?? (isDev ? DEFAULT_DEV_DEVTOOL : false);
61
- }
62
- }
63
- });
1
+ var isProduction = 'production' === process.env.NODE_ENV;
2
+ var prefix = 'Invariant failed';
3
+ function invariant(condition, message) {
4
+ if (condition) return;
5
+ if (isProduction) throw new Error(prefix);
6
+ var provided = 'function' == typeof message ? message() : message;
7
+ var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
8
+ throw new Error(value);
9
+ }
10
+ class EvalSourceMapDevToolPlugin_EvalSourceMapDevToolPlugin {
11
+ options;
12
+ constructor(options){
13
+ this.options = options;
14
+ }
15
+ apply(compiler) {
16
+ const { EvalSourceMapDevToolPlugin } = compiler.webpack;
17
+ new EvalSourceMapDevToolPlugin(this.options).apply(compiler);
18
+ }
19
+ }
20
+ class SourceMapDevToolPlugin_SourceMapDevToolPlugin {
21
+ options;
22
+ constructor(options){
23
+ this.options = options;
24
+ }
25
+ apply(compiler) {
26
+ const { SourceMapDevToolPlugin } = compiler.webpack;
27
+ new SourceMapDevToolPlugin(this.options).apply(compiler);
28
+ }
29
+ }
30
+ function pluginSourcemap() {
31
+ return {
32
+ name: 'lynx:rsbuild:sourcemap',
33
+ pre: [
34
+ 'lynx:rsbuild:dev'
35
+ ],
36
+ setup (api) {
37
+ api.modifyBundlerChain((chain, { isDev })=>{
38
+ const { dev, output, server } = api.getRsbuildConfig('current');
39
+ const publicPath = isDev ? dev?.assetPrefix : output?.assetPrefix;
40
+ if (false === publicPath) return;
41
+ invariant('string' == typeof publicPath || void 0 === publicPath, `dev.assetPrefix should be normalized to string, got ${dev?.assetPrefix}`);
42
+ applySourceMapPlugin(chain, getDevtoolFromSourceMap(), publicPath?.replaceAll('<port>', String(api.context.devServer?.port ?? server?.port)));
43
+ function getDevtoolFromSourceMap() {
44
+ const DEFAULT_DEV_DEVTOOL = 'cheap-module-source-map';
45
+ switch(typeof output?.sourceMap){
46
+ case 'boolean':
47
+ if (output.sourceMap) return isDev ? DEFAULT_DEV_DEVTOOL : 'source-map';
48
+ return false;
49
+ case 'undefined':
50
+ case 'object':
51
+ return output?.sourceMap?.js ?? (isDev ? DEFAULT_DEV_DEVTOOL : false);
52
+ }
64
53
  }
65
- };
66
- }
67
- function applySourceMapPlugin(chain, devtool, publicPath) {
68
- if (false === devtool) return;
69
- const CHAIN_ID_DEV_SOURCEMAP = 'lynx:sourcemap';
70
- const output = chain.get('output');
71
- if (devtool.includes('source-map')) {
72
- const hidden = devtool.includes('hidden');
73
- const inline = devtool.includes('inline');
74
- const evalWrapped = devtool.includes('eval');
75
- const cheap = devtool.includes('cheap');
76
- const moduleMaps = devtool.includes('module');
77
- const noSources = devtool.includes('nosources');
78
- const debugIds = devtool.includes('debugids');
79
- const options = {
80
- filename: inline ? null : output?.sourceMapFilename ?? '[file].map[query]',
81
- moduleFilenameTemplate: output?.devtoolModuleFilenameTemplate ?? 'file://[absolute-resource-path]',
82
- fallbackModuleFilenameTemplate: output?.devtoolFallbackModuleFilenameTemplate ?? 'file://[absolute-resource-path]?[hash]',
83
- append: hidden ? false : void 0,
84
- module: moduleMaps ? true : !cheap,
85
- columns: !cheap,
86
- noSources,
87
- namespace: output?.devtoolNamespace,
88
- publicPath,
89
- debugIds
90
- };
91
- chain.devtool(false).plugin(CHAIN_ID_DEV_SOURCEMAP).when(evalWrapped, (plugin)=>plugin.use(EvalSourceMapDevToolPlugin_EvalSourceMapDevToolPlugin, [
92
- options
93
- ]), (plugin)=>plugin.use(SourceMapDevToolPlugin_SourceMapDevToolPlugin, [
94
- options
95
- ]));
96
- }
54
+ });
97
55
  }
56
+ };
57
+ }
58
+ function applySourceMapPlugin(chain, devtool, publicPath) {
59
+ if (false === devtool) return;
60
+ const CHAIN_ID_DEV_SOURCEMAP = 'lynx:sourcemap';
61
+ const output = chain.get('output');
62
+ if (devtool.includes('source-map')) {
63
+ const hidden = devtool.includes('hidden');
64
+ const inline = devtool.includes('inline');
65
+ const evalWrapped = devtool.includes('eval');
66
+ const cheap = devtool.includes('cheap');
67
+ const moduleMaps = devtool.includes('module');
68
+ const noSources = devtool.includes('nosources');
69
+ const debugIds = devtool.includes('debugids');
70
+ const options = {
71
+ filename: inline ? null : output?.sourceMapFilename ?? '[file].map[query]',
72
+ moduleFilenameTemplate: output?.devtoolModuleFilenameTemplate ?? 'file://[absolute-resource-path]',
73
+ fallbackModuleFilenameTemplate: output?.devtoolFallbackModuleFilenameTemplate ?? 'file://[absolute-resource-path]?[hash]',
74
+ append: hidden ? false : void 0,
75
+ module: moduleMaps ? true : !cheap,
76
+ columns: !cheap,
77
+ noSources,
78
+ namespace: output?.devtoolNamespace,
79
+ publicPath,
80
+ debugIds
81
+ };
82
+ chain.devtool(false).plugin(CHAIN_ID_DEV_SOURCEMAP).when(evalWrapped, (plugin)=>plugin.use(EvalSourceMapDevToolPlugin_EvalSourceMapDevToolPlugin, [
83
+ options
84
+ ]), (plugin)=>plugin.use(SourceMapDevToolPlugin_SourceMapDevToolPlugin, [
85
+ options
86
+ ]));
98
87
  }
99
- };
88
+ }
89
+ export { pluginSourcemap };
@@ -1,39 +1,21 @@
1
- export const __rspack_esm_id = "src_plugins_swc_plugin_ts";
2
- export const __rspack_esm_ids = [
3
- "src_plugins_swc_plugin_ts"
4
- ];
5
- export const __webpack_modules__ = {
6
- "./src/plugins/swc.plugin.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
7
- __webpack_require__.d(__webpack_exports__, {
8
- pluginSwc: ()=>pluginSwc
9
- });
10
- var _utils_getESVersionTarget_js__rspack_import_0 = __webpack_require__("./src/utils/getESVersionTarget.ts");
11
- function pluginSwc() {
12
- return {
13
- name: 'lynx:rsbuild:swc',
14
- setup (api) {
15
- api.modifyRsbuildConfig((config, { mergeRsbuildConfig })=>{
16
- const isProd = 'production' === config.mode;
17
- return mergeRsbuildConfig(config, {
18
- tools: {
19
- swc (config) {
20
- delete config.env;
21
- config.jsc ??= {};
22
- config.jsc.target = (0, _utils_getESVersionTarget_js__rspack_import_0.y)(isProd);
23
- }
24
- }
25
- });
26
- });
27
- }
28
- };
1
+ import { getESVersionTarget } from "./0~src_utils_getESVersionTarget_ts.js";
2
+ function pluginSwc() {
3
+ return {
4
+ name: 'lynx:rsbuild:swc',
5
+ setup (api) {
6
+ api.modifyRsbuildConfig((config, { mergeRsbuildConfig })=>{
7
+ const isProd = 'production' === config.mode;
8
+ return mergeRsbuildConfig(config, {
9
+ tools: {
10
+ swc (config) {
11
+ delete config.env;
12
+ config.jsc ??= {};
13
+ config.jsc.target = getESVersionTarget(isProd);
14
+ }
15
+ }
16
+ });
17
+ });
29
18
  }
30
- },
31
- "./src/utils/getESVersionTarget.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
32
- __webpack_require__.d(__webpack_exports__, {
33
- y: ()=>getESVersionTarget
34
- });
35
- function getESVersionTarget(isProd) {
36
- return isProd ? 'es2015' : 'es2019';
37
- }
38
- }
39
- };
19
+ };
20
+ }
21
+ export { pluginSwc };
@@ -1,40 +1,22 @@
1
- export const __rspack_esm_id = "src_plugins_target_plugin_ts";
2
- export const __rspack_esm_ids = [
3
- "src_plugins_target_plugin_ts"
4
- ];
5
- export const __webpack_modules__ = {
6
- "./src/plugins/target.plugin.ts" (__unused_rspack_module, __webpack_exports__, __webpack_require__) {
7
- __webpack_require__.d(__webpack_exports__, {
8
- pluginTarget: ()=>pluginTarget
9
- });
10
- var getESVersionTarget = __webpack_require__("./src/utils/getESVersionTarget.ts");
11
- function isWeb(environment) {
12
- const environmentName = 'string' == typeof environment ? environment : environment.name;
13
- return 'web' === environmentName || environmentName.startsWith('web-');
1
+ import { getESVersionTarget } from "./0~src_utils_getESVersionTarget_ts.js";
2
+ function isWeb(environment) {
3
+ const environmentName = 'string' == typeof environment ? environment : environment.name;
4
+ return 'web' === environmentName || environmentName.startsWith('web-');
5
+ }
6
+ function pluginTarget() {
7
+ return {
8
+ name: 'lynx:rsbuild:target',
9
+ setup (api) {
10
+ api.modifyBundlerChain((options, { environment, isProd })=>{
11
+ if (isWeb(environment)) options.target([
12
+ getESVersionTarget(isProd),
13
+ 'web'
14
+ ]);
15
+ else options.target([
16
+ getESVersionTarget(isProd)
17
+ ]);
18
+ });
14
19
  }
15
- function pluginTarget() {
16
- return {
17
- name: 'lynx:rsbuild:target',
18
- setup (api) {
19
- api.modifyBundlerChain((options, { environment, isProd })=>{
20
- if (isWeb(environment)) options.target([
21
- (0, getESVersionTarget.y)(isProd),
22
- 'web'
23
- ]);
24
- else options.target([
25
- (0, getESVersionTarget.y)(isProd)
26
- ]);
27
- });
28
- }
29
- };
30
- }
31
- },
32
- "./src/utils/getESVersionTarget.ts" (__unused_rspack_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
- };
20
+ };
21
+ }
22
+ export { pluginTarget };
@@ -0,0 +1,4 @@
1
+ function getESVersionTarget(isProd) {
2
+ return isProd ? 'es2015' : 'es2019';
3
+ }
4
+ export { getESVersionTarget };