@rsbuild/webpack 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 (65) hide show
  1. package/dist/config/defaults.js +1 -4
  2. package/dist/core/createContext.js +0 -4
  3. package/dist/core/initConfigs.js +1 -2
  4. package/dist/core/startDevServer.js +6 -1
  5. package/dist/core/webpackConfig.js +7 -8
  6. package/dist/plugins/babel.d.ts +1 -1
  7. package/dist/plugins/minimize.js +5 -2
  8. package/dist/plugins/tsLoader.js +2 -3
  9. package/dist/shared/plugin.js +0 -2
  10. package/dist/types/config/index.d.ts +6 -14
  11. package/dist/types/config/index.js +0 -10
  12. package/dist/types/config/security.d.ts +3 -3
  13. package/dist/types/config/source.d.ts +3 -13
  14. package/dist/types/config/tools.d.ts +8 -11
  15. package/dist/types/context.d.ts +0 -2
  16. package/dist/types/hooks.d.ts +7 -2
  17. package/dist/types/thirdParty/index.d.ts +0 -1
  18. package/dist/webpackPlugins/ModuleScopePlugin.js +3 -4
  19. package/dist/webpackPlugins/ProgressPlugin/helpers/bar.js +9 -10
  20. package/dist/webpackPlugins/ProgressPlugin/helpers/type.d.ts +5 -7
  21. package/package.json +8 -7
  22. package/compiled/webpack-manifest-plugin/index.js +0 -1
  23. package/compiled/webpack-manifest-plugin/license +0 -21
  24. package/compiled/webpack-manifest-plugin/package.json +0 -1
  25. package/compiled/webpack-manifest-plugin/types/helpers.d.ts +0 -23
  26. package/compiled/webpack-manifest-plugin/types/hooks.d.ts +0 -24
  27. package/compiled/webpack-manifest-plugin/types/index.d.ts +0 -30
  28. package/dist/config/validate/dev.d.ts +0 -3
  29. package/dist/config/validate/dev.js +0 -29
  30. package/dist/config/validate/experiments.d.ts +0 -3
  31. package/dist/config/validate/experiments.js +0 -29
  32. package/dist/config/validate/html.d.ts +0 -3
  33. package/dist/config/validate/html.js +0 -29
  34. package/dist/config/validate/index.d.ts +0 -4
  35. package/dist/config/validate/index.js +0 -52
  36. package/dist/config/validate/output.d.ts +0 -3
  37. package/dist/config/validate/output.js +0 -37
  38. package/dist/config/validate/performance.d.ts +0 -3
  39. package/dist/config/validate/performance.js +0 -47
  40. package/dist/config/validate/security.d.ts +0 -4
  41. package/dist/config/validate/security.js +0 -38
  42. package/dist/config/validate/source.d.ts +0 -3
  43. package/dist/config/validate/source.js +0 -34
  44. package/dist/config/validate/tools.d.ts +0 -3
  45. package/dist/config/validate/tools.js +0 -48
  46. package/dist/exports/HtmlWebpackPlugin.d.ts +0 -2
  47. package/dist/exports/HtmlWebpackPlugin.js +0 -35
  48. package/dist/plugins/manifest.d.ts +0 -2
  49. package/dist/plugins/manifest.js +0 -58
  50. package/dist/plugins/pug.d.ts +0 -2
  51. package/dist/plugins/pug.js +0 -52
  52. package/dist/types/config/dev.d.ts +0 -3
  53. package/dist/types/config/dev.js +0 -16
  54. package/dist/types/config/experiments.d.ts +0 -3
  55. package/dist/types/config/experiments.js +0 -16
  56. package/dist/types/config/html.d.ts +0 -3
  57. package/dist/types/config/html.js +0 -16
  58. package/dist/types/config/output.d.ts +0 -9
  59. package/dist/types/config/output.js +0 -16
  60. package/dist/types/config/performance.d.ts +0 -3
  61. package/dist/types/config/performance.js +0 -16
  62. package/dist/types/thirdParty/CopyWebpackPlugin.d.ts +0 -62
  63. package/dist/types/thirdParty/CopyWebpackPlugin.js +0 -16
  64. package/dist/webpackLoaders/pugLoader.d.ts +0 -3
  65. package/dist/webpackLoaders/pugLoader.js +0 -44
@@ -1,30 +0,0 @@
1
- import { Compiler, WebpackPluginInstance } from 'webpack';
2
- import { FileDescriptor } from './helpers';
3
- import { getCompilerHooks } from './hooks';
4
- export declare type Manifest = Record<string, any>;
5
- export interface InternalOptions {
6
- [key: string]: any;
7
- assetHookStage: number;
8
- basePath: string;
9
- fileName: string;
10
- filter: (file: FileDescriptor) => Boolean;
11
- generate: (seed: Record<any, any>, files: FileDescriptor[], entries: Record<string, string[]>) => Manifest;
12
- map: (file: FileDescriptor) => FileDescriptor;
13
- publicPath: string;
14
- removeKeyHash: RegExp | false;
15
- seed: Record<any, any>;
16
- serialize: (manifest: Manifest) => string;
17
- sort: (fileA: FileDescriptor, fileB: FileDescriptor) => Number;
18
- transformExtensions: RegExp;
19
- useEntryKeys: Boolean;
20
- useLegacyEmit: Boolean;
21
- writeToFileEmit: Boolean;
22
- }
23
- export declare type ManifestPluginOptions = Partial<InternalOptions>;
24
- export declare type EmitCountMap = Map<any, any>;
25
- declare class WebpackManifestPlugin implements WebpackPluginInstance {
26
- private options;
27
- constructor(opts: ManifestPluginOptions);
28
- apply(compiler: Compiler): void;
29
- }
30
- export { getCompilerHooks, WebpackManifestPlugin };
@@ -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 { ExperimentsConfig } from '../../types';
3
- export declare const experimentsConfigSchema: z.ZodType<ExperimentsConfig>;
@@ -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 experiments_exports = {};
20
- __export(experiments_exports, {
21
- experimentsConfigSchema: () => experimentsConfigSchema
22
- });
23
- module.exports = __toCommonJS(experiments_exports);
24
- var import_shared = require("@rsbuild/shared");
25
- const experimentsConfigSchema = import_shared.sharedExperimentsConfigSchema;
26
- // Annotate the CommonJS export names for ESM import in node:
27
- 0 && (module.exports = {
28
- experimentsConfigSchema
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,52 +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_experiments = require("./experiments");
29
- var import_html = require("./html");
30
- var import_output = require("./output");
31
- var import_performance = require("./performance");
32
- var import_security = require("./security");
33
- var import_source = require("./source");
34
- var import_tools = require("./tools");
35
- const configSchema = import_zod.z.partialObj({
36
- source: import_source.sourceConfigSchema,
37
- dev: import_dev.devConfigSchema,
38
- html: import_html.htmlConfigSchema,
39
- experiments: import_experiments.experimentsConfigSchema,
40
- output: import_output.outputConfigSchema,
41
- performance: import_performance.performanceConfigSchema,
42
- security: import_security.securityConfigSchema,
43
- tools: import_tools.toolsConfigSchema
44
- });
45
- const validateRsbuildConfig = async (data) => {
46
- return (0, import_shared.validateRsbuildConfig)(configSchema, data);
47
- };
48
- // Annotate the CommonJS export names for ESM import in node:
49
- 0 && (module.exports = {
50
- configSchema,
51
- validateRsbuildConfig
52
- });
@@ -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,37 +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 AdditionalOptionsSchema = import_shared.z.partialObj({ concurrency: import_shared.z.number() });
26
- const CopyPluginPatternsSchema = import_shared.z.array(import_shared.z.any());
27
- const CopyPluginOptionsSchema = import_shared.z.object({
28
- patterns: CopyPluginPatternsSchema,
29
- options: import_shared.z.optional(AdditionalOptionsSchema)
30
- });
31
- const outputConfigSchema = import_shared.sharedOutputConfigSchema.extend({
32
- copy: import_shared.z.union([CopyPluginOptionsSchema, CopyPluginPatternsSchema])
33
- }).partial();
34
- // Annotate the CommonJS export names for ESM import in node:
35
- 0 && (module.exports = {
36
- outputConfigSchema
37
- });
@@ -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,47 +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([
27
- "split-by-module",
28
- "split-by-experience",
29
- "all-in-one",
30
- "single-vendor"
31
- ]),
32
- forceSplitting: import_shared.ForceSplittingSchema,
33
- override: import_shared.z.any().optional()
34
- });
35
- const RsbuildChunkSplitSchema = import_shared.z.union([
36
- BaseChunkSplitSchema,
37
- import_shared.SplitBySizeSchema,
38
- import_shared.SplitCustomSchema
39
- ]);
40
- const performanceConfigSchema = import_shared.sharedPerformanceConfigSchema.extend({
41
- bundleAnalyze: import_shared.z.any(),
42
- chunkSplit: RsbuildChunkSplitSchema
43
- }).partial();
44
- // Annotate the CommonJS export names for ESM import in node:
45
- 0 && (module.exports = {
46
- performanceConfigSchema
47
- });
@@ -1,4 +0,0 @@
1
- import { z, SriOptions } from '@rsbuild/shared';
2
- import type { SecurityConfig } from '../../types';
3
- export declare const SriOptionsSchema: z.ZodType<SriOptions>;
4
- export declare const securityConfigSchema: z.ZodType<SecurityConfig>;
@@ -1,38 +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
- SriOptionsSchema: () => SriOptionsSchema,
22
- securityConfigSchema: () => securityConfigSchema
23
- });
24
- module.exports = __toCommonJS(security_exports);
25
- var import_shared = require("@rsbuild/shared");
26
- const SriOptionsSchema = import_shared.z.partialObj({
27
- hashFuncNames: import_shared.z.array(import_shared.z.string()).min(1),
28
- enabled: import_shared.z.literals(["auto", true, false]),
29
- hashLoading: import_shared.z.enum(["eager", "lazy"])
30
- });
31
- const securityConfigSchema = import_shared.sharedSecurityConfigSchema.extend({
32
- sri: import_shared.z.union([SriOptionsSchema, import_shared.z.boolean()])
33
- }).partial();
34
- // Annotate the CommonJS export names for ESM import in node:
35
- 0 && (module.exports = {
36
- SriOptionsSchema,
37
- securityConfigSchema
38
- });
@@ -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,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 __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
- moduleScopes: import_shared.z.chained(
28
- import_shared.z.array(import_shared.z.union([import_shared.z.string(), import_shared.z.instanceof(RegExp)]))
29
- )
30
- }).partial();
31
- // Annotate the CommonJS export names for ESM import in node:
32
- 0 && (module.exports = {
33
- sourceConfigSchema
34
- });
@@ -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,48 +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
- terser: import_shared.z.chained(import_shared.z.any()),
27
- tsLoader: import_shared.z.chained(
28
- import_shared.z.any(),
29
- import_shared.z.object({
30
- addIncludes: import_shared.z.string(),
31
- addExcludes: import_shared.FileFilterUtilSchema
32
- })
33
- ),
34
- htmlPlugin: import_shared.z.chained(
35
- import_shared.z.any(),
36
- import_shared.z.object({ entryName: import_shared.z.string(), entryValue: import_shared.z.any() })
37
- ),
38
- cssExtract: import_shared.z.partialObj({
39
- pluginOptions: import_shared.z.any(),
40
- loaderOptions: import_shared.z.any()
41
- }),
42
- webpack: import_shared.z.chained(import_shared.z.any(), import_shared.z.any()),
43
- webpackChain: import_shared.z.arrayOrNot(import_shared.z.function())
44
- }).partial();
45
- // Annotate the CommonJS export names for ESM import in node:
46
- 0 && (module.exports = {
47
- toolsConfigSchema
48
- });
@@ -1,2 +0,0 @@
1
- import HtmlWebpackPlugin from 'html-webpack-plugin';
2
- export default HtmlWebpackPlugin;
@@ -1,35 +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 HtmlWebpackPlugin_exports = {};
30
- __export(HtmlWebpackPlugin_exports, {
31
- default: () => HtmlWebpackPlugin_default
32
- });
33
- module.exports = __toCommonJS(HtmlWebpackPlugin_exports);
34
- var import_html_webpack_plugin = __toESM(require("html-webpack-plugin"));
35
- var HtmlWebpackPlugin_default = import_html_webpack_plugin.default;
@@ -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.modifyWebpackChain(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("../../compiled/webpack-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,52 +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 pug_exports = {};
30
- __export(pug_exports, {
31
- pluginPug: () => pluginPug
32
- });
33
- module.exports = __toCommonJS(pug_exports);
34
- var import_path = __toESM(require("path"));
35
- var import_shared = require("@rsbuild/shared");
36
- const pluginPug = () => ({
37
- name: "plugin-pug",
38
- setup(api) {
39
- api.modifyWebpackChain(async (chain, { CHAIN_ID }) => {
40
- const config = api.getNormalizedConfig();
41
- const { pug } = config.tools;
42
- if (!pug) {
43
- return;
44
- }
45
- chain.module.rule(CHAIN_ID.RULE.PUG).test(/\.pug$/).use(CHAIN_ID.USE.PUG).loader(import_path.default.resolve(__dirname, "../webpackLoaders/pugLoader")).options((0, import_shared.mergeChainedOptions)({}, pug === true ? {} : pug));
46
- });
47
- }
48
- });
49
- // Annotate the CommonJS export names for ESM import in node:
50
- 0 && (module.exports = {
51
- pluginPug
52
- });
@@ -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 { SharedExperimentsConfig } from '@rsbuild/shared';
2
- export type ExperimentsConfig = SharedExperimentsConfig;
3
- export type NormalizedExperimentsConfig = Required<ExperimentsConfig>;
@@ -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 experiments_exports = {};
16
- module.exports = __toCommonJS(experiments_exports);
@@ -1,3 +0,0 @@
1
- import type { SharedHtmlConfig, NormalizedSharedHtmlConfig } from '@rsbuild/shared';
2
- export type HtmlConfig = SharedHtmlConfig;
3
- export type NormalizedHtmlConfig = NormalizedSharedHtmlConfig;