@rsbuild/core 0.0.12 → 0.0.14

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 (89) 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/fileSize.js +9 -11
  8. package/dist/plugins/html.d.ts +4 -4
  9. package/dist/plugins/html.js +18 -9
  10. package/dist/plugins/index.js +1 -1
  11. package/dist/plugins/moment.d.ts +1 -1
  12. package/dist/plugins/moment.js +27 -2
  13. package/dist/plugins/nodeAddons.js +1 -2
  14. package/dist/plugins/splitChunks.js +2 -10
  15. package/dist/plugins/startUrl.js +6 -8
  16. package/dist/rspack-provider/config/defaults.js +1 -4
  17. package/dist/rspack-provider/core/build.d.ts +4 -5
  18. package/dist/rspack-provider/core/createCompiler.d.ts +2 -1
  19. package/dist/rspack-provider/core/createContext.js +0 -4
  20. package/dist/rspack-provider/core/initConfigs.d.ts +1 -1
  21. package/dist/rspack-provider/core/initConfigs.js +1 -2
  22. package/dist/rspack-provider/core/initHooks.d.ts +2 -2
  23. package/dist/rspack-provider/core/inspectConfig.d.ts +3 -4
  24. package/dist/rspack-provider/core/rspackConfig.d.ts +2 -2
  25. package/dist/rspack-provider/core/rspackConfig.js +5 -8
  26. package/dist/rspack-provider/core/startDevServer.d.ts +3 -4
  27. package/dist/rspack-provider/core/startDevServer.js +1 -1
  28. package/dist/rspack-provider/index.d.ts +2 -1
  29. package/dist/rspack-provider/plugins/css.d.ts +2 -2
  30. package/dist/rspack-provider/plugins/css.js +2 -2
  31. package/dist/rspack-provider/plugins/fallback.js +0 -2
  32. package/dist/rspack-provider/plugins/minimize.d.ts +3 -2
  33. package/dist/rspack-provider/plugins/minimize.js +9 -4
  34. package/dist/rspack-provider/plugins/swc.d.ts +2 -2
  35. package/dist/rspack-provider/provider.d.ts +3 -3
  36. package/dist/rspack-provider/provider.js +1 -2
  37. package/dist/rspack-provider/rspackPlugin/removeCssSourcemapPlugin.d.ts +1 -1
  38. package/dist/rspack-provider/shared/plugin.js +0 -3
  39. package/dist/rspack-provider/types/context.d.ts +1 -4
  40. package/dist/rspack-provider/types/hooks.d.ts +2 -10
  41. package/dist/rspack-provider/types/index.d.ts +1 -2
  42. package/dist/rspack-provider/types/index.js +1 -5
  43. package/dist/rspack-provider/types/plugin.d.ts +3 -4
  44. package/dist/utils/generateMetaTags.d.ts +2 -1
  45. package/dist/utils/generateMetaTags.js +4 -18
  46. package/package.json +8 -8
  47. package/static/openChrome.applescript +95 -0
  48. package/dist/plugins/checkSyntax.d.ts +0 -0
  49. package/dist/plugins/checkSyntax.js +0 -1
  50. package/dist/plugins/svg.d.ts +0 -2
  51. package/dist/plugins/svg.js +0 -60
  52. package/dist/rspack-provider/config/validate/dev.d.ts +0 -3
  53. package/dist/rspack-provider/config/validate/dev.js +0 -29
  54. package/dist/rspack-provider/config/validate/html.d.ts +0 -3
  55. package/dist/rspack-provider/config/validate/html.js +0 -29
  56. package/dist/rspack-provider/config/validate/index.d.ts +0 -4
  57. package/dist/rspack-provider/config/validate/index.js +0 -50
  58. package/dist/rspack-provider/config/validate/output.d.ts +0 -3
  59. package/dist/rspack-provider/config/validate/output.js +0 -29
  60. package/dist/rspack-provider/config/validate/performance.d.ts +0 -3
  61. package/dist/rspack-provider/config/validate/performance.js +0 -41
  62. package/dist/rspack-provider/config/validate/security.d.ts +0 -3
  63. package/dist/rspack-provider/config/validate/security.js +0 -29
  64. package/dist/rspack-provider/config/validate/source.d.ts +0 -3
  65. package/dist/rspack-provider/config/validate/source.js +0 -31
  66. package/dist/rspack-provider/config/validate/tools.d.ts +0 -3
  67. package/dist/rspack-provider/config/validate/tools.js +0 -35
  68. package/dist/rspack-provider/plugins/manifest.d.ts +0 -2
  69. package/dist/rspack-provider/plugins/manifest.js +0 -58
  70. package/dist/rspack-provider/plugins/pug.d.ts +0 -2
  71. package/dist/rspack-provider/plugins/pug.js +0 -67
  72. package/dist/rspack-provider/types/config/dev.d.ts +0 -3
  73. package/dist/rspack-provider/types/config/dev.js +0 -16
  74. package/dist/rspack-provider/types/config/html.d.ts +0 -3
  75. package/dist/rspack-provider/types/config/html.js +0 -16
  76. package/dist/rspack-provider/types/config/index.d.ts +0 -34
  77. package/dist/rspack-provider/types/config/index.js +0 -34
  78. package/dist/rspack-provider/types/config/output.d.ts +0 -9
  79. package/dist/rspack-provider/types/config/output.js +0 -16
  80. package/dist/rspack-provider/types/config/performance.d.ts +0 -3
  81. package/dist/rspack-provider/types/config/performance.js +0 -16
  82. package/dist/rspack-provider/types/config/security.d.ts +0 -3
  83. package/dist/rspack-provider/types/config/security.js +0 -16
  84. package/dist/rspack-provider/types/config/source.d.ts +0 -11
  85. package/dist/rspack-provider/types/config/source.js +0 -16
  86. package/dist/rspack-provider/types/config/tools.d.ts +0 -21
  87. package/dist/rspack-provider/types/config/tools.js +0 -16
  88. package/dist/rspack-provider/types/rspack.d.ts +0 -107
  89. package/dist/rspack-provider/types/rspack.js +0 -16
@@ -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 pluginManifest: () => RsbuildPlugin;
@@ -1,58 +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 manifest_exports = {};
30
- __export(manifest_exports, {
31
- pluginManifest: () => pluginManifest
32
- });
33
- module.exports = __toCommonJS(manifest_exports);
34
- var import_shared = require("@rsbuild/shared");
35
- const pluginManifest = () => ({
36
- name: "plugin-manifest",
37
- setup(api) {
38
- api.modifyBundlerChain(async (chain, { CHAIN_ID }) => {
39
- const config = api.getNormalizedConfig();
40
- if (!config.output.enableAssetManifest) {
41
- return;
42
- }
43
- const { WebpackManifestPlugin } = await Promise.resolve().then(() => __toESM(require("rspack-manifest-plugin")));
44
- const publicPath = chain.output.get("publicPath");
45
- chain.plugin(CHAIN_ID.PLUGIN.MANIFEST).use(WebpackManifestPlugin, [
46
- {
47
- fileName: "asset-manifest.json",
48
- publicPath,
49
- generate: import_shared.generateManifest
50
- }
51
- ]);
52
- });
53
- }
54
- });
55
- // Annotate the CommonJS export names for ESM import in node:
56
- 0 && (module.exports = {
57
- pluginManifest
58
- });
@@ -1,2 +0,0 @@
1
- import type { RsbuildPlugin } from '../types';
2
- export declare const pluginPug: () => RsbuildPlugin;
@@ -1,67 +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 pug_exports = {};
20
- __export(pug_exports, {
21
- pluginPug: () => pluginPug
22
- });
23
- module.exports = __toCommonJS(pug_exports);
24
- var import_shared = require("@rsbuild/shared");
25
- var import_shared2 = require("../shared");
26
- const getPugTemplateCompiler = (userOptions) => ({
27
- async compile(content, compileOptions) {
28
- const options = {
29
- filename: compileOptions.filename,
30
- doctype: "html",
31
- compileDebug: false,
32
- ...userOptions
33
- };
34
- const pug = require((0, import_shared2.getCompiledPath)("pug"));
35
- return `${pug.compileClient(content, options)};
36
- template;`;
37
- }
38
- });
39
- const pluginPug = () => ({
40
- name: "plugin-pug",
41
- setup(api) {
42
- api.modifyBundlerChain(async (chain, { CHAIN_ID }) => {
43
- const config = api.getNormalizedConfig();
44
- const { pug } = config.tools;
45
- if (!pug) {
46
- return;
47
- }
48
- const entries = chain.entryPoints.entries() || {};
49
- const entryNames = Object.keys(entries);
50
- const pugOptions = (0, import_shared.mergeChainedOptions)({}, pug === true ? {} : pug);
51
- const templateCompiler = getPugTemplateCompiler(pugOptions);
52
- entryNames.forEach((entry) => {
53
- chain.plugin(`${CHAIN_ID.PLUGIN.HTML}-${entry}`).tap((options) => {
54
- var _a;
55
- if ((_a = options[0]) == null ? void 0 : _a.template.endsWith(".pug")) {
56
- options[0].templateCompiler = templateCompiler;
57
- }
58
- return options;
59
- });
60
- });
61
- });
62
- }
63
- });
64
- // Annotate the CommonJS export names for ESM import in node:
65
- 0 && (module.exports = {
66
- pluginPug
67
- });
@@ -1,3 +0,0 @@
1
- import type { SharedDevConfig, NormalizedSharedDevConfig } from '@rsbuild/shared';
2
- export type DevConfig = SharedDevConfig;
3
- export type NormalizedDevConfig = NormalizedSharedDevConfig;
@@ -1,16 +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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var dev_exports = {};
16
- module.exports = __toCommonJS(dev_exports);
@@ -1,3 +0,0 @@
1
- import type { SharedHtmlConfig, NormalizedSharedHtmlConfig } from '@rsbuild/shared';
2
- export type HtmlConfig = SharedHtmlConfig;
3
- export type NormalizedHtmlConfig = NormalizedSharedHtmlConfig;
@@ -1,16 +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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var html_exports = {};
16
- module.exports = __toCommonJS(html_exports);
@@ -1,34 +0,0 @@
1
- import type { DeepReadonly } from '@rsbuild/shared';
2
- import type { DevConfig, NormalizedDevConfig } from './dev';
3
- import type { HtmlConfig, NormalizedHtmlConfig } from './html';
4
- import type { NormalizedOutputConfig, OutputConfig } from './output';
5
- import type { NormalizedPerformanceConfig, PerformanceConfig } from './performance';
6
- import type { NormalizedSecurityConfig, SecurityConfig } from './security';
7
- import type { NormalizedSourceConfig, SourceConfig } from './source';
8
- import type { NormalizedToolsConfig, ToolsConfig } from './tools';
9
- /** The Rsbuild config when using rspack-provider */
10
- export interface RsbuildConfig {
11
- dev?: DevConfig;
12
- html?: HtmlConfig;
13
- tools?: ToolsConfig;
14
- source?: SourceConfig;
15
- output?: OutputConfig;
16
- security?: SecurityConfig;
17
- performance?: PerformanceConfig;
18
- }
19
- export type NormalizedConfig = DeepReadonly<{
20
- dev: NormalizedDevConfig;
21
- html: NormalizedHtmlConfig;
22
- tools: NormalizedToolsConfig;
23
- source: NormalizedSourceConfig;
24
- output: NormalizedOutputConfig;
25
- security: NormalizedSecurityConfig;
26
- performance: NormalizedPerformanceConfig;
27
- }>;
28
- export * from './dev';
29
- export * from './html';
30
- export * from './output';
31
- export * from './performance';
32
- export * from './security';
33
- export * from './source';
34
- export * from './tools';
@@ -1,34 +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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
- var config_exports = {};
17
- module.exports = __toCommonJS(config_exports);
18
- __reExport(config_exports, require("./dev"), module.exports);
19
- __reExport(config_exports, require("./html"), module.exports);
20
- __reExport(config_exports, require("./output"), module.exports);
21
- __reExport(config_exports, require("./performance"), module.exports);
22
- __reExport(config_exports, require("./security"), module.exports);
23
- __reExport(config_exports, require("./source"), module.exports);
24
- __reExport(config_exports, require("./tools"), module.exports);
25
- // Annotate the CommonJS export names for ESM import in node:
26
- 0 && (module.exports = {
27
- ...require("./dev"),
28
- ...require("./html"),
29
- ...require("./output"),
30
- ...require("./performance"),
31
- ...require("./security"),
32
- ...require("./source"),
33
- ...require("./tools")
34
- });
@@ -1,9 +0,0 @@
1
- import type { SharedOutputConfig, NormalizedSharedOutputConfig } from '@rsbuild/shared';
2
- import type { Builtins } from '@rspack/core';
3
- export type OutputConfig = SharedOutputConfig & {
4
- /**
5
- * Copies the specified file or directory to the dist directory.
6
- */
7
- copy?: Builtins['copy'] | NonNullable<Builtins['copy']>['patterns'];
8
- };
9
- export type NormalizedOutputConfig = OutputConfig & NormalizedSharedOutputConfig;
@@ -1,16 +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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var output_exports = {};
16
- module.exports = __toCommonJS(output_exports);
@@ -1,3 +0,0 @@
1
- import type { SharedPerformanceConfig, NormalizedSharedPerformanceConfig } from '@rsbuild/shared';
2
- export type PerformanceConfig = SharedPerformanceConfig;
3
- export type NormalizedPerformanceConfig = NormalizedSharedPerformanceConfig;
@@ -1,16 +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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var performance_exports = {};
16
- module.exports = __toCommonJS(performance_exports);
@@ -1,3 +0,0 @@
1
- import type { SharedSecurityConfig, NormalizedSharedSecurityConfig } from '@rsbuild/shared';
2
- export type SecurityConfig = SharedSecurityConfig;
3
- export type NormalizedSecurityConfig = NormalizedSharedSecurityConfig;
@@ -1,16 +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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var security_exports = {};
16
- module.exports = __toCommonJS(security_exports);
@@ -1,11 +0,0 @@
1
- import type { SharedSourceConfig, NormalizedSharedSourceConfig } from '@rsbuild/shared';
2
- import type { Builtins } from '@rspack/core';
3
- import type { RspackBuiltinsConfig } from '../rspack';
4
- export type SourceConfig = SharedSourceConfig & {
5
- define?: RspackBuiltinsConfig['define'];
6
- transformImport?: false | Builtins['pluginImport'];
7
- };
8
- export type NormalizedSourceConfig = NormalizedSharedSourceConfig & {
9
- define: Record<string, string>;
10
- transformImport?: false | Builtins['pluginImport'];
11
- };
@@ -1,16 +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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var source_exports = {};
16
- module.exports = __toCommonJS(source_exports);
@@ -1,21 +0,0 @@
1
- import type { ChainedConfig, SharedToolsConfig, ToolsLessConfig, ToolsSassConfig, PostCSSLoaderOptions, PostCSSPlugin } from '@rsbuild/shared';
2
- import type { Options as HTMLPluginOptions } from '@rspack/plugin-html';
3
- import type { RspackConfig } from '../rspack';
4
- import type { ModifyRspackConfigUtils } from '../hooks';
5
- export type ToolsPostCSSLoaderConfig = ChainedConfig<PostCSSLoaderOptions, {
6
- addPlugins: (plugins: PostCSSPlugin | PostCSSPlugin[]) => void;
7
- }>;
8
- type ToolsHtmlPluginConfig = ChainedConfig<HTMLPluginOptions, {
9
- entryName: string;
10
- entryValue: string | string[];
11
- }>;
12
- export type ToolsRspackConfig = ChainedConfig<RspackConfig, ModifyRspackConfigUtils>;
13
- export interface ToolsConfig extends SharedToolsConfig {
14
- htmlPlugin?: false | ToolsHtmlPluginConfig;
15
- postcss?: ToolsPostCSSLoaderConfig;
16
- rspack?: ToolsRspackConfig;
17
- less?: ToolsLessConfig;
18
- sass?: ToolsSassConfig;
19
- }
20
- export type NormalizedToolsConfig = ToolsConfig;
21
- export {};
@@ -1,16 +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 __copyProps = (to, from, except, desc) => {
7
- if (from && typeof from === "object" || typeof from === "function") {
8
- for (let key of __getOwnPropNames(from))
9
- if (!__hasOwnProp.call(to, key) && key !== except)
10
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
- }
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
- var tools_exports = {};
16
- module.exports = __toCommonJS(tools_exports);