@rsbuild/core 0.0.12 → 0.0.13

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 (80) hide show
  1. package/dist/cli/config.d.ts +3 -9
  2. package/dist/cli/index.js +1 -2
  3. package/dist/plugins/asset.d.ts +2 -1
  4. package/dist/plugins/asset.js +10 -1
  5. package/dist/plugins/entry.d.ts +1 -1
  6. package/dist/plugins/entry.js +2 -12
  7. package/dist/plugins/html.d.ts +4 -4
  8. package/dist/plugins/html.js +18 -9
  9. package/dist/plugins/index.js +1 -1
  10. package/dist/plugins/startUrl.js +6 -8
  11. package/dist/rspack-provider/config/defaults.js +1 -4
  12. package/dist/rspack-provider/core/build.d.ts +4 -5
  13. package/dist/rspack-provider/core/createCompiler.d.ts +2 -1
  14. package/dist/rspack-provider/core/createContext.js +0 -4
  15. package/dist/rspack-provider/core/initConfigs.d.ts +1 -1
  16. package/dist/rspack-provider/core/initConfigs.js +1 -2
  17. package/dist/rspack-provider/core/initHooks.d.ts +2 -2
  18. package/dist/rspack-provider/core/inspectConfig.d.ts +3 -4
  19. package/dist/rspack-provider/core/rspackConfig.d.ts +2 -2
  20. package/dist/rspack-provider/core/rspackConfig.js +4 -5
  21. package/dist/rspack-provider/core/startDevServer.d.ts +3 -4
  22. package/dist/rspack-provider/core/startDevServer.js +1 -1
  23. package/dist/rspack-provider/index.d.ts +2 -1
  24. package/dist/rspack-provider/plugins/css.d.ts +2 -2
  25. package/dist/rspack-provider/plugins/css.js +2 -2
  26. package/dist/rspack-provider/plugins/minimize.d.ts +3 -2
  27. package/dist/rspack-provider/plugins/minimize.js +9 -4
  28. package/dist/rspack-provider/plugins/swc.d.ts +2 -2
  29. package/dist/rspack-provider/provider.d.ts +3 -3
  30. package/dist/rspack-provider/rspackPlugin/removeCssSourcemapPlugin.d.ts +1 -1
  31. package/dist/rspack-provider/shared/plugin.js +0 -2
  32. package/dist/rspack-provider/types/context.d.ts +1 -4
  33. package/dist/rspack-provider/types/hooks.d.ts +2 -10
  34. package/dist/rspack-provider/types/index.d.ts +1 -2
  35. package/dist/rspack-provider/types/index.js +1 -5
  36. package/dist/rspack-provider/types/plugin.d.ts +3 -4
  37. package/dist/utils/generateMetaTags.d.ts +2 -1
  38. package/dist/utils/generateMetaTags.js +4 -18
  39. package/package.json +7 -6
  40. package/static/openChrome.applescript +95 -0
  41. package/dist/plugins/checkSyntax.d.ts +0 -0
  42. package/dist/plugins/checkSyntax.js +0 -1
  43. package/dist/plugins/svg.d.ts +0 -2
  44. package/dist/plugins/svg.js +0 -60
  45. package/dist/rspack-provider/config/validate/dev.d.ts +0 -3
  46. package/dist/rspack-provider/config/validate/dev.js +0 -29
  47. package/dist/rspack-provider/config/validate/html.d.ts +0 -3
  48. package/dist/rspack-provider/config/validate/html.js +0 -29
  49. package/dist/rspack-provider/config/validate/index.d.ts +0 -4
  50. package/dist/rspack-provider/config/validate/index.js +0 -50
  51. package/dist/rspack-provider/config/validate/output.d.ts +0 -3
  52. package/dist/rspack-provider/config/validate/output.js +0 -29
  53. package/dist/rspack-provider/config/validate/performance.d.ts +0 -3
  54. package/dist/rspack-provider/config/validate/performance.js +0 -41
  55. package/dist/rspack-provider/config/validate/security.d.ts +0 -3
  56. package/dist/rspack-provider/config/validate/security.js +0 -29
  57. package/dist/rspack-provider/config/validate/source.d.ts +0 -3
  58. package/dist/rspack-provider/config/validate/source.js +0 -31
  59. package/dist/rspack-provider/config/validate/tools.d.ts +0 -3
  60. package/dist/rspack-provider/config/validate/tools.js +0 -35
  61. package/dist/rspack-provider/plugins/pug.d.ts +0 -2
  62. package/dist/rspack-provider/plugins/pug.js +0 -67
  63. package/dist/rspack-provider/types/config/dev.d.ts +0 -3
  64. package/dist/rspack-provider/types/config/dev.js +0 -16
  65. package/dist/rspack-provider/types/config/html.d.ts +0 -3
  66. package/dist/rspack-provider/types/config/html.js +0 -16
  67. package/dist/rspack-provider/types/config/index.d.ts +0 -34
  68. package/dist/rspack-provider/types/config/index.js +0 -34
  69. package/dist/rspack-provider/types/config/output.d.ts +0 -9
  70. package/dist/rspack-provider/types/config/output.js +0 -16
  71. package/dist/rspack-provider/types/config/performance.d.ts +0 -3
  72. package/dist/rspack-provider/types/config/performance.js +0 -16
  73. package/dist/rspack-provider/types/config/security.d.ts +0 -3
  74. package/dist/rspack-provider/types/config/security.js +0 -16
  75. package/dist/rspack-provider/types/config/source.d.ts +0 -11
  76. package/dist/rspack-provider/types/config/source.js +0 -16
  77. package/dist/rspack-provider/types/config/tools.d.ts +0 -21
  78. package/dist/rspack-provider/types/config/tools.js +0 -16
  79. package/dist/rspack-provider/types/rspack.d.ts +0 -107
  80. package/dist/rspack-provider/types/rspack.js +0 -16
@@ -1,5 +1,4 @@
1
1
  export * from './hooks';
2
- export * from './config';
3
2
  export * from './plugin';
4
3
  export * from './context';
5
- export * from './rspack';
4
+ export type { RsbuildConfig, NormalizedConfig, DevConfig, HtmlConfig, ToolsConfig, SourceConfig, OutputConfig, SecurityConfig, PerformanceConfig, NormalizedDevConfig, NormalizedHtmlConfig, NormalizedToolsConfig, NormalizedSourceConfig, NormalizedOutputConfig, NormalizedSecurityConfig, NormalizedPerformanceConfig } from '@rsbuild/shared';
@@ -16,15 +16,11 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
16
16
  var types_exports = {};
17
17
  module.exports = __toCommonJS(types_exports);
18
18
  __reExport(types_exports, require("./hooks"), module.exports);
19
- __reExport(types_exports, require("./config"), module.exports);
20
19
  __reExport(types_exports, require("./plugin"), module.exports);
21
20
  __reExport(types_exports, require("./context"), module.exports);
22
- __reExport(types_exports, require("./rspack"), module.exports);
23
21
  // Annotate the CommonJS export names for ESM import in node:
24
22
  0 && (module.exports = {
25
23
  ...require("./hooks"),
26
- ...require("./config"),
27
24
  ...require("./plugin"),
28
- ...require("./context"),
29
- ...require("./rspack")
25
+ ...require("./context")
30
26
  });
@@ -1,8 +1,7 @@
1
- import type { DefaultRsbuildPluginAPI, RsbuildPlugin as BaseRsbuildPlugin } from '@rsbuild/shared';
2
- import type { RsbuildConfig, NormalizedConfig } from './config';
1
+ import type { RsbuildConfig, NormalizedConfig, DefaultRsbuildPluginAPI, RsbuildPlugin as BaseRsbuildPlugin } from '@rsbuild/shared';
3
2
  import type { ModifyRspackConfigFn } from './hooks';
4
- import type { Compiler, MultiCompiler, RspackConfig } from './rspack';
5
- export interface RsbuildPluginAPI extends DefaultRsbuildPluginAPI<RsbuildConfig, NormalizedConfig, RspackConfig, Compiler | MultiCompiler> {
3
+ import type { RspackConfig, RspackCompiler, RspackMultiCompiler } from '@rsbuild/shared';
4
+ export interface RsbuildPluginAPI extends DefaultRsbuildPluginAPI<RsbuildConfig, NormalizedConfig, RspackConfig, RspackCompiler | RspackMultiCompiler> {
6
5
  modifyRspackConfig: (fn: ModifyRspackConfigFn) => void;
7
6
  }
8
7
  export type RsbuildPlugin = BaseRsbuildPlugin<RsbuildPluginAPI>;
@@ -8,4 +8,5 @@
8
8
  * Modified from https://github.com/jantimon/html-webpack-plugin/blob/2f5de7ab9e8bca60e9e200f2e4b4cfab90db28d4/index.js#L800
9
9
  */
10
10
  import type { MetaOptions } from '@rsbuild/shared';
11
- export declare const generateMetaTags: (metaOptions?: MetaOptions) => string;
11
+ import type { HtmlTagObject } from 'html-webpack-plugin';
12
+ export declare const generateMetaTags: (metaOptions?: MetaOptions) => HtmlTagObject[];
@@ -21,20 +21,9 @@ __export(generateMetaTags_exports, {
21
21
  generateMetaTags: () => generateMetaTags
22
22
  });
23
23
  module.exports = __toCommonJS(generateMetaTags_exports);
24
- const tagObjectToString = (tagDefinition) => {
25
- const attributes = Object.keys(tagDefinition.attributes || {}).filter(
26
- (attributeName) => tagDefinition.attributes[attributeName] !== false
27
- ).map((attributeName) => {
28
- if (tagDefinition.attributes[attributeName] === true) {
29
- return attributeName;
30
- }
31
- return `${attributeName}="${tagDefinition.attributes[attributeName]}"`;
32
- });
33
- return `<${[tagDefinition.tagName].concat(attributes).join(" ")}>${tagDefinition.innerHTML || ""}${tagDefinition.voidTag ? "" : `</${tagDefinition.tagName}>`}`;
34
- };
35
24
  const generateMetaTags = (metaOptions) => {
36
25
  if (!metaOptions) {
37
- return "";
26
+ return [];
38
27
  }
39
28
  const metaTagAttributeObjects = Object.keys(metaOptions).map((metaName) => {
40
29
  const metaTagContent = metaOptions[metaName];
@@ -50,13 +39,10 @@ const generateMetaTags = (metaOptions) => {
50
39
  return {
51
40
  tagName: "meta",
52
41
  voidTag: true,
53
- attributes: metaTagAttributes
42
+ attributes: metaTagAttributes,
43
+ meta: {}
54
44
  };
55
- }).reduce(
56
- (memo, tagObject) => `${memo}
57
- ${tagObjectToString(tagObject)}`,
58
- ""
59
- );
45
+ });
60
46
  };
61
47
  // Annotate the CommonJS export names for ESM import in node:
62
48
  0 && (module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rsbuild/core",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Unleash the power of Rspack with the out-of-the-box build tool.",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "bugs": {
@@ -57,15 +57,16 @@
57
57
  },
58
58
  "files": [
59
59
  "bin",
60
- "dist"
60
+ "dist",
61
+ "static"
61
62
  ],
62
63
  "dependencies": {
63
- "@modern-js/server": "^2.39.0",
64
- "@rspack/core": "0.3.8",
65
- "@rspack/plugin-html": "0.3.8",
64
+ "@modern-js/server": "^2.39.2",
65
+ "@rspack/core": "0.3.10",
66
66
  "commander": "^10.0.1",
67
67
  "filesize": "^8.0.7",
68
68
  "gzip-size": "^6.0.0",
69
+ "html-webpack-plugin": "5.5.3",
69
70
  "jiti": "^1.20.0",
70
71
  "lodash": "^4.17.21",
71
72
  "open": "^8.4.0",
@@ -74,7 +75,7 @@
74
75
  "rspack-manifest-plugin": "5.0.0-alpha0",
75
76
  "semver": "^7.5.4",
76
77
  "webpack": "^5.89.0",
77
- "@rsbuild/shared": "0.0.12"
78
+ "@rsbuild/shared": "0.0.13"
78
79
  },
79
80
  "devDependencies": {
80
81
  "@types/lodash": "^4.14.200",
@@ -0,0 +1,95 @@
1
+ (*
2
+ Copyright (c) 2015-present, Facebook, Inc.
3
+
4
+ This source code is licensed under the MIT license found in the
5
+ LICENSE file at
6
+ https://github.com/facebookincubator/create-react-app/blob/master/LICENSE
7
+ *)
8
+
9
+ property targetTab: null
10
+ property targetTabIndex: -1
11
+ property targetWindow: null
12
+ property theProgram: "Google Chrome"
13
+
14
+ on run argv
15
+ set theURL to item 1 of argv
16
+
17
+ -- Allow requested program to be optional,
18
+ -- default to Google Chrome
19
+ if (count of argv) > 1 then
20
+ set theProgram to item 2 of argv
21
+ end if
22
+
23
+ using terms from application "Google Chrome"
24
+ tell application theProgram
25
+
26
+ if (count every window) = 0 then
27
+ make new window
28
+ end if
29
+
30
+ -- 1: Looking for tab running debugger
31
+ -- then, Reload debugging tab if found
32
+ -- then return
33
+ set found to my lookupTabWithUrl(theURL)
34
+ if found then
35
+ set targetWindow's active tab index to targetTabIndex
36
+ tell targetTab to reload
37
+ tell targetWindow to activate
38
+ set index of targetWindow to 1
39
+ return
40
+ end if
41
+
42
+ -- 2: Looking for Empty tab
43
+ -- In case debugging tab was not found
44
+ -- We try to find an empty tab instead
45
+ set found to my lookupTabWithUrl("chrome://newtab/")
46
+ if found then
47
+ set targetWindow's active tab index to targetTabIndex
48
+ set URL of targetTab to theURL
49
+ tell targetWindow to activate
50
+ return
51
+ end if
52
+
53
+ -- 3: Create new tab
54
+ -- both debugging and empty tab were not found
55
+ -- make a new tab with url
56
+ tell window 1
57
+ activate
58
+ make new tab with properties {URL:theURL}
59
+ end tell
60
+ end tell
61
+ end using terms from
62
+ end run
63
+
64
+ -- Function:
65
+ -- Lookup tab with given url
66
+ -- if found, store tab, index, and window in properties
67
+ -- (properties were declared on top of file)
68
+ on lookupTabWithUrl(lookupUrl)
69
+ using terms from application "Google Chrome"
70
+ tell application theProgram
71
+ -- Find a tab with the given url
72
+ set found to false
73
+ set theTabIndex to -1
74
+ repeat with theWindow in every window
75
+ set theTabIndex to 0
76
+ repeat with theTab in every tab of theWindow
77
+ set theTabIndex to theTabIndex + 1
78
+ if (theTab's URL as string) contains lookupUrl then
79
+ -- assign tab, tab index, and window to properties
80
+ set targetTab to theTab
81
+ set targetTabIndex to theTabIndex
82
+ set targetWindow to theWindow
83
+ set found to true
84
+ exit repeat
85
+ end if
86
+ end repeat
87
+
88
+ if found then
89
+ exit repeat
90
+ end if
91
+ end repeat
92
+ end tell
93
+ end using terms from
94
+ return found
95
+ end lookupTabWithUrl
File without changes
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,2 +0,0 @@
1
- import type { DefaultRsbuildPlugin } from '@rsbuild/shared';
2
- export declare const pluginSvg: () => DefaultRsbuildPlugin;
@@ -1,60 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var svg_exports = {};
30
- __export(svg_exports, {
31
- pluginSvg: () => pluginSvg
32
- });
33
- module.exports = __toCommonJS(svg_exports);
34
- var import_path = __toESM(require("path"));
35
- var import_shared = require("@rsbuild/shared");
36
- const pluginSvg = () => {
37
- return {
38
- name: "plugin-svg",
39
- setup(api) {
40
- api.modifyBundlerChain(async (chain, { isProd, CHAIN_ID }) => {
41
- const config = api.getNormalizedConfig();
42
- const assetType = "svg";
43
- const distDir = (0, import_shared.getDistPath)(config.output, "svg");
44
- const filename = (0, import_shared.getFilename)(config.output, "svg", isProd);
45
- const maxSize = config.output.dataUriLimit[assetType];
46
- const rule = chain.module.rule(CHAIN_ID.RULE.SVG).test(import_shared.SVG_REGEX);
47
- (0, import_shared.chainStaticAssetRule)({
48
- rule,
49
- maxSize,
50
- filename: import_path.default.posix.join(distDir, filename),
51
- assetType
52
- });
53
- });
54
- }
55
- };
56
- };
57
- // Annotate the CommonJS export names for ESM import in node:
58
- 0 && (module.exports = {
59
- pluginSvg
60
- });
@@ -1,3 +0,0 @@
1
- import { z } from '@rsbuild/shared';
2
- import type { DevConfig } from '../../types';
3
- export declare const devConfigSchema: z.ZodType<DevConfig>;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var dev_exports = {};
20
- __export(dev_exports, {
21
- devConfigSchema: () => devConfigSchema
22
- });
23
- module.exports = __toCommonJS(dev_exports);
24
- var import_shared = require("@rsbuild/shared");
25
- const devConfigSchema = import_shared.sharedDevConfigSchema;
26
- // Annotate the CommonJS export names for ESM import in node:
27
- 0 && (module.exports = {
28
- devConfigSchema
29
- });
@@ -1,3 +0,0 @@
1
- import { z } from '@rsbuild/shared';
2
- import type { HtmlConfig } from '../../types';
3
- export declare const htmlConfigSchema: z.ZodType<HtmlConfig>;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var html_exports = {};
20
- __export(html_exports, {
21
- htmlConfigSchema: () => htmlConfigSchema
22
- });
23
- module.exports = __toCommonJS(html_exports);
24
- var import_shared = require("@rsbuild/shared");
25
- const htmlConfigSchema = import_shared.sharedHtmlConfigSchema;
26
- // Annotate the CommonJS export names for ESM import in node:
27
- 0 && (module.exports = {
28
- htmlConfigSchema
29
- });
@@ -1,4 +0,0 @@
1
- import { z } from '@rsbuild/shared/zod';
2
- import { RsbuildConfig } from '../../types';
3
- export declare const configSchema: z.ZodType<RsbuildConfig>;
4
- export declare const validateRsbuildConfig: (data: unknown) => Promise<unknown>;
@@ -1,50 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var validate_exports = {};
20
- __export(validate_exports, {
21
- configSchema: () => configSchema,
22
- validateRsbuildConfig: () => validateRsbuildConfig
23
- });
24
- module.exports = __toCommonJS(validate_exports);
25
- var import_zod = require("@rsbuild/shared/zod");
26
- var import_shared = require("@rsbuild/shared");
27
- var import_dev = require("./dev");
28
- var import_html = require("./html");
29
- var import_output = require("./output");
30
- var import_performance = require("./performance");
31
- var import_source = require("./source");
32
- var import_tools = require("./tools");
33
- var import_security = require("./security");
34
- const configSchema = import_zod.z.partialObj({
35
- source: import_source.sourceConfigSchema,
36
- dev: import_dev.devConfigSchema,
37
- html: import_html.htmlConfigSchema,
38
- output: import_output.outputConfigSchema,
39
- security: import_security.securityConfigSchema,
40
- performance: import_performance.performanceConfigSchema,
41
- tools: import_tools.toolsConfigSchema
42
- });
43
- const validateRsbuildConfig = async (data) => {
44
- return (0, import_shared.validateRsbuildConfig)(configSchema, data);
45
- };
46
- // Annotate the CommonJS export names for ESM import in node:
47
- 0 && (module.exports = {
48
- configSchema,
49
- validateRsbuildConfig
50
- });
@@ -1,3 +0,0 @@
1
- import { z } from '@rsbuild/shared';
2
- import type { OutputConfig } from '../../types';
3
- export declare const outputConfigSchema: z.ZodType<OutputConfig>;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var output_exports = {};
20
- __export(output_exports, {
21
- outputConfigSchema: () => outputConfigSchema
22
- });
23
- module.exports = __toCommonJS(output_exports);
24
- var import_shared = require("@rsbuild/shared");
25
- const outputConfigSchema = import_shared.sharedOutputConfigSchema;
26
- // Annotate the CommonJS export names for ESM import in node:
27
- 0 && (module.exports = {
28
- outputConfigSchema
29
- });
@@ -1,3 +0,0 @@
1
- import { z } from '@rsbuild/shared';
2
- import type { PerformanceConfig } from '../../types';
3
- export declare const performanceConfigSchema: z.ZodType<PerformanceConfig>;
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var performance_exports = {};
20
- __export(performance_exports, {
21
- performanceConfigSchema: () => performanceConfigSchema
22
- });
23
- module.exports = __toCommonJS(performance_exports);
24
- var import_shared = require("@rsbuild/shared");
25
- const BaseChunkSplitSchema = import_shared.BaseSplitRulesSchema.extend({
26
- strategy: import_shared.z.enum(["split-by-experience", "all-in-one", "single-vendor"]),
27
- forceSplitting: import_shared.ForceSplittingSchema,
28
- override: import_shared.z.any().optional()
29
- });
30
- const RsbuildChunkSplitSchema = import_shared.z.union([
31
- BaseChunkSplitSchema,
32
- import_shared.SplitBySizeSchema,
33
- import_shared.SplitCustomSchema
34
- ]);
35
- const performanceConfigSchema = import_shared.sharedPerformanceConfigSchema.extend({
36
- chunkSplit: RsbuildChunkSplitSchema
37
- }).partial();
38
- // Annotate the CommonJS export names for ESM import in node:
39
- 0 && (module.exports = {
40
- performanceConfigSchema
41
- });
@@ -1,3 +0,0 @@
1
- import { z } from '@rsbuild/shared';
2
- import type { SecurityConfig } from '../../types';
3
- export declare const securityConfigSchema: z.ZodType<SecurityConfig>;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var security_exports = {};
20
- __export(security_exports, {
21
- securityConfigSchema: () => securityConfigSchema
22
- });
23
- module.exports = __toCommonJS(security_exports);
24
- var import_shared = require("@rsbuild/shared");
25
- const securityConfigSchema = import_shared.sharedSecurityConfigSchema;
26
- // Annotate the CommonJS export names for ESM import in node:
27
- 0 && (module.exports = {
28
- securityConfigSchema
29
- });
@@ -1,3 +0,0 @@
1
- import { z } from '@rsbuild/shared';
2
- import type { SourceConfig } from '../../types';
3
- export declare const sourceConfigSchema: z.ZodType<SourceConfig>;
@@ -1,31 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var source_exports = {};
20
- __export(source_exports, {
21
- sourceConfigSchema: () => sourceConfigSchema
22
- });
23
- module.exports = __toCommonJS(source_exports);
24
- var import_shared = require("@rsbuild/shared");
25
- const sourceConfigSchema = import_shared.sharedSourceConfigSchema.extend({
26
- define: import_shared.z.record(import_shared.z.any())
27
- }).partial();
28
- // Annotate the CommonJS export names for ESM import in node:
29
- 0 && (module.exports = {
30
- sourceConfigSchema
31
- });
@@ -1,3 +0,0 @@
1
- import { z } from '@rsbuild/shared';
2
- import type { ToolsConfig } from '../../types';
3
- export declare const toolsConfigSchema: z.ZodType<ToolsConfig>;
@@ -1,35 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var tools_exports = {};
20
- __export(tools_exports, {
21
- toolsConfigSchema: () => toolsConfigSchema
22
- });
23
- module.exports = __toCommonJS(tools_exports);
24
- var import_shared = require("@rsbuild/shared");
25
- const toolsConfigSchema = import_shared.sharedToolsConfigSchema.extend({
26
- htmlPlugin: import_shared.z.chained(
27
- import_shared.z.any(),
28
- import_shared.z.object({ entryName: import_shared.z.string(), entryValue: import_shared.z.any() })
29
- ),
30
- rspack: import_shared.z.chained(import_shared.z.any(), import_shared.z.any())
31
- });
32
- // Annotate the CommonJS export names for ESM import in node:
33
- 0 && (module.exports = {
34
- toolsConfigSchema
35
- });
@@ -1,2 +0,0 @@
1
- import type { RsbuildPlugin } from '../types';
2
- export declare const pluginPug: () => RsbuildPlugin;