@rspack/core
Advanced tools
Comparing version 1.0.0-alpha.2 to 1.0.0-alpha.3
export { resolvePluginImport } from "./pluginImport"; | ||
export type { PluginImportOptions } from "./pluginImport"; | ||
export type { ReactOptions } from "./react"; | ||
export { resolveReact } from "./react"; | ||
export type { SwcLoaderEnvConfig, SwcLoaderEsParserConfig, SwcLoaderJscConfig, SwcLoaderModuleConfig, SwcLoaderOptions, SwcLoaderParserConfig, SwcLoaderTransformConfig, SwcLoaderTsParserConfig } from "./types"; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.resolveReact = exports.resolvePluginImport = void 0; | ||
exports.resolvePluginImport = void 0; | ||
var pluginImport_1 = require("./pluginImport"); | ||
Object.defineProperty(exports, "resolvePluginImport", { enumerable: true, get: function () { return pluginImport_1.resolvePluginImport; } }); | ||
var react_1 = require("./react"); | ||
Object.defineProperty(exports, "resolveReact", { enumerable: true, get: function () { return react_1.resolveReact; } }); |
@@ -1,2 +0,18 @@ | ||
import type { RawPluginImportConfig } from "@rspack/binding"; | ||
type RawStyleConfig = { | ||
styleLibraryDirectory?: string; | ||
custom?: string; | ||
css?: string; | ||
bool?: boolean; | ||
}; | ||
type RawPluginImportConfig = { | ||
libraryName: string; | ||
libraryDirectory?: string; | ||
customName?: string; | ||
customStyleName?: string; | ||
style?: RawStyleConfig; | ||
camelToDashComponentName?: boolean; | ||
transformToDefaultImport?: boolean; | ||
ignoreEsComponent?: Array<string>; | ||
ignoreStyleComponent?: Array<string>; | ||
}; | ||
type PluginImportConfig = { | ||
@@ -3,0 +19,0 @@ libraryName: string; |
@@ -1,2 +0,12 @@ | ||
import type { RawReactOptions } from "@rspack/binding"; | ||
type RawReactOptions = { | ||
runtime?: "automatic" | "classic"; | ||
importSource?: string; | ||
pragma?: string; | ||
pragmaFrag?: string; | ||
throwIfNamespace?: boolean; | ||
development?: boolean; | ||
useBuiltins?: boolean; | ||
useSpread?: boolean; | ||
refresh?: boolean; | ||
}; | ||
declare function resolveReact(react: ReactOptions): RawReactOptions; | ||
@@ -3,0 +13,0 @@ type ReactOptions = RawReactOptions | undefined; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, JsChunk, RawBannerPluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName, type JsChunk } from "@rspack/binding"; | ||
import { z } from "../../compiled/zod"; | ||
@@ -185,5 +185,26 @@ declare const rule: z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>; | ||
name: BuiltinPluginName; | ||
_options: RawBannerPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [args: string | ((args_0: { | ||
hash: string; | ||
chunk: JsChunk; | ||
filename: string; | ||
}, ...args_1: unknown[]) => string) | { | ||
banner: (string | ((args_0: { | ||
hash: string; | ||
chunk: JsChunk; | ||
filename: string; | ||
}, ...args_1: unknown[]) => string)) & (string | ((args_0: { | ||
hash: string; | ||
chunk: JsChunk; | ||
filename: string; | ||
}, ...args_1: unknown[]) => string) | undefined); | ||
entryOnly?: boolean | undefined; | ||
exclude?: string | RegExp | (string | RegExp)[] | undefined; | ||
include?: string | RegExp | (string | RegExp)[] | undefined; | ||
raw?: boolean | undefined; | ||
footer?: boolean | undefined; | ||
stage?: number | undefined; | ||
test?: string | RegExp | (string | RegExp)[] | undefined; | ||
}]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
@@ -190,0 +211,0 @@ }; |
@@ -1,3 +0,3 @@ | ||
import * as binding from "@rspack/binding"; | ||
import { Compiler, RspackPluginInstance } from ".."; | ||
import type * as binding from "@rspack/binding"; | ||
import type { Compiler, RspackPluginInstance } from ".."; | ||
type AffectedHooks = keyof Compiler["hooks"]; | ||
@@ -13,8 +13,8 @@ export declare const HOOKS_CAN_NOT_INHERENT_FROM_PARENT: string[]; | ||
export declare function createBuiltinPlugin<R>(name: binding.BuiltinPluginName, options: R): binding.BuiltinPlugin; | ||
export declare function create<T extends any[], R>(name: binding.BuiltinPluginName, resolve: (...args: T) => R, affectedHooks?: AffectedHooks): { | ||
export declare function create<T extends any[], R>(name: binding.BuiltinPluginName, resolve: (this: Compiler, ...args: T) => R, affectedHooks?: AffectedHooks): { | ||
new (...args: T): { | ||
name: binding.BuiltinPluginName; | ||
_options: R; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): binding.BuiltinPlugin; | ||
_args: T; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: Compiler): binding.BuiltinPlugin; | ||
apply(compiler: Compiler): void; | ||
@@ -21,0 +21,0 @@ }; |
@@ -49,6 +49,6 @@ "use strict"; | ||
this.affectedHooks = affectedHooks; | ||
this._options = resolve(...args); | ||
this._args = args; | ||
} | ||
raw() { | ||
return createBuiltinPlugin(name, this._options); | ||
raw(compiler) { | ||
return createBuiltinPlugin(name, resolve.apply(compiler, this._args)); | ||
} | ||
@@ -55,0 +55,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawBundlerInfoPluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName } from "@rspack/binding"; | ||
export type BundleInfoOptions = { | ||
@@ -10,7 +10,7 @@ version?: string; | ||
name: BuiltinPluginName; | ||
_options: RawBundlerInfoPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [options: BundleInfoOptions]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawCopyPattern, RawCopyRspackPluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName, type RawCopyPattern } from "@rspack/binding"; | ||
export type CopyRspackPluginOptions = { | ||
@@ -10,7 +10,7 @@ patterns: (string | ({ | ||
name: BuiltinPluginName; | ||
_options: RawCopyRspackPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [copy: CopyRspackPluginOptions]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
import type { RawCssExtractPluginOption } from "@rspack/binding"; | ||
import { Compiler } from "../.."; | ||
import type { Compiler } from "../.."; | ||
export * from "./loader"; | ||
@@ -4,0 +4,0 @@ export type { CssExtractRspackLoaderOptions } from "./loader"; |
@@ -37,3 +37,8 @@ "use strict"; | ||
this._compiler.options.experiments && | ||
this._compiler.options.experiments.css) { | ||
this._compiler.options.experiments.css && | ||
this._module && | ||
(this._module.type === "css" || | ||
this._module.type === "css/auto" || | ||
this._module.type === "css/global" || | ||
this._module.type === "css/module")) { | ||
return content; | ||
@@ -46,4 +51,9 @@ } | ||
this._compiler.options.experiments && | ||
this._compiler.options.experiments.css) { | ||
let e = new Error("You can't use `experiments.css` and `css-extract-rspack-plugin` together, please set `experiments.css` to `false`"); | ||
this._compiler.options.experiments.css && | ||
this._module && | ||
(this._module.type === "css" || | ||
this._module.type === "css/auto" || | ||
this._module.type === "css/global" || | ||
this._module.type === "css/module")) { | ||
let e = new Error(`use type 'css' and \`CssExtractRspackPlugin\` together, please set \`experiments.css\` to \`false\` or set \`{ type: "javascript/auto" }\` for rules with \`CssExtractRspackPlugin\` in your rspack config (now \`CssExtractRspackPlugin\` does nothing).`); | ||
e.stack = undefined; | ||
@@ -50,0 +60,0 @@ this.emitWarning(e); |
@@ -1,2 +0,2 @@ | ||
import { LoaderContext } from "../.."; | ||
import type { LoaderContext } from "../.."; | ||
export declare function isAbsolutePath(str: string): boolean; | ||
@@ -3,0 +3,0 @@ export declare function isRelativePath(str: string): boolean; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
import { BuiltinPluginName } from "@rspack/binding"; | ||
export type DefinePluginOptions = Record<string, string | boolean | undefined>; | ||
export type DefinePluginOptions = Record<string, CodeValue>; | ||
export declare const DefinePlugin: { | ||
new (define: DefinePluginOptions): { | ||
name: BuiltinPluginName; | ||
_options: Record<string, string>; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [define: DefinePluginOptions]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; | ||
type CodeValue = RecursiveArrayOrRecord<CodeValuePrimitive>; | ||
type CodeValuePrimitive = null | undefined | RegExp | Function | string | number | boolean | bigint | undefined; | ||
type RecursiveArrayOrRecord<T> = { | ||
[index: string]: RecursiveArrayOrRecord<T>; | ||
} | Array<RecursiveArrayOrRecord<T>> | T; | ||
export {}; |
@@ -6,10 +6,44 @@ "use strict"; | ||
const base_1 = require("./base"); | ||
exports.DefinePlugin = (0, base_1.create)(binding_1.BuiltinPluginName.DefinePlugin, (define) => { | ||
const entries = Object.entries(define).map(([key, value]) => { | ||
if (typeof value !== "string") { | ||
value = value === undefined ? "undefined" : JSON.stringify(value); | ||
exports.DefinePlugin = (0, base_1.create)(binding_1.BuiltinPluginName.DefinePlugin, function (define) { | ||
let supportsBigIntLiteral = this.options.output.environment?.bigIntLiteral ?? false; | ||
return normalizeValue(define, supportsBigIntLiteral); | ||
}, "compilation"); | ||
const normalizeValue = (define, supportsBigIntLiteral) => { | ||
const normalizePrimitive = (p) => { | ||
if (p === undefined) { | ||
return "undefined"; | ||
} | ||
return [key, value]; | ||
}); | ||
return Object.fromEntries(entries); | ||
}, "compilation"); | ||
else if (Object.is(p, -0)) { | ||
return "-0"; | ||
} | ||
else if (p instanceof RegExp) { | ||
return p.toString(); | ||
} | ||
else if (typeof p === "function") { | ||
return "(" + p.toString() + ")"; | ||
} | ||
else if (typeof p === "bigint") { | ||
return supportsBigIntLiteral ? `${p}n` : `BigInt("${p}")`; | ||
} | ||
else { | ||
// assume `p` is a valid JSON value | ||
return p; | ||
} | ||
}; | ||
const normalizeObject = (define) => { | ||
if (Array.isArray(define)) { | ||
return define.map(normalizeObject); | ||
} | ||
else if (define instanceof RegExp) { | ||
return normalizePrimitive(define); | ||
} | ||
else if (define && typeof define === "object") { | ||
let keys = Object.keys(define); | ||
return Object.fromEntries(keys.map(k => [k, normalizeObject(define[k])])); | ||
} | ||
else { | ||
return normalizePrimitive(define); | ||
} | ||
}; | ||
return normalizeObject(define); | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,11 +0,11 @@ | ||
import { BuiltinPluginName, RawDynamicEntryPluginOptions } from "@rspack/binding"; | ||
import { EntryDynamicNormalized } from "../config"; | ||
import { BuiltinPluginName } from "@rspack/binding"; | ||
import type { EntryDynamicNormalized } from "../config"; | ||
export declare const DynamicEntryPlugin: { | ||
new (context: string, entry: EntryDynamicNormalized): { | ||
name: BuiltinPluginName; | ||
_options: RawDynamicEntryPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [context: string, entry: EntryDynamicNormalized]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: string; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [context?: string | undefined]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: any; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [type: any]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,3 +0,3 @@ | ||
import { BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import { Compiler, LibraryType } from ".."; | ||
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import type { Compiler, LibraryType } from ".."; | ||
import { RspackBuiltinPlugin } from "./base"; | ||
@@ -4,0 +4,0 @@ export declare class EnableLibraryPlugin extends RspackBuiltinPlugin { |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: any; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [type: any]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,3 +0,3 @@ | ||
import { BuiltinPluginName, RawEntryOptions, RawEntryPluginOptions } from "@rspack/binding"; | ||
import { ChunkLoading, EntryRuntime, FilenameTemplate, LibraryOptions, PublicPath } from "../config"; | ||
import { BuiltinPluginName, type RawEntryOptions } from "@rspack/binding"; | ||
import { type ChunkLoading, type EntryRuntime, type FilenameTemplate, type LibraryOptions, type PublicPath } from "../config"; | ||
export type EntryOptions = { | ||
@@ -17,5 +17,5 @@ name?: string; | ||
name: BuiltinPluginName; | ||
_options: RawEntryPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [context: string, entry: string, options?: string | EntryOptions | undefined]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
@@ -22,0 +22,0 @@ }; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawEvalDevToolModulePluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName, type RawEvalDevToolModulePluginOptions } from "@rspack/binding"; | ||
export type { RawEvalDevToolModulePluginOptions as EvalDevToolModulePluginOptions }; | ||
@@ -6,7 +6,7 @@ export declare const EvalDevToolModulePlugin: { | ||
name: BuiltinPluginName; | ||
_options: RawEvalDevToolModulePluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [options: RawEvalDevToolModulePluginOptions]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,11 +0,11 @@ | ||
import { BuiltinPluginName, RawSourceMapDevToolPluginOptions } from "@rspack/binding"; | ||
import { SourceMapDevToolPluginOptions } from "./SourceMapDevToolPlugin"; | ||
import { BuiltinPluginName } from "@rspack/binding"; | ||
import type { SourceMapDevToolPluginOptions } from "./SourceMapDevToolPlugin"; | ||
export declare const EvalSourceMapDevToolPlugin: { | ||
new (options: SourceMapDevToolPluginOptions): { | ||
name: BuiltinPluginName; | ||
_options: RawSourceMapDevToolPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [options: SourceMapDevToolPluginOptions]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawExternalsPluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName } from "@rspack/binding"; | ||
export declare const ExternalsPlugin: { | ||
@@ -7,3 +7,3 @@ new (type: string, externals: string | RegExp | Record<string, string | boolean | string[] | Record<string, string | string[]>> | ((args_0: { | ||
request?: string | undefined; | ||
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "commonjs" | "umd" | "amd" | "promise" | "global" | "jsonp" | "import" | "commonjs2" | "var" | "module" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { | ||
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "promise" | "module" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { | ||
context?: string | undefined; | ||
@@ -16,3 +16,3 @@ dependencyType?: string | undefined; | ||
request?: string | undefined; | ||
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "commonjs" | "umd" | "amd" | "promise" | "global" | "jsonp" | "import" | "commonjs2" | "var" | "module" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { | ||
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "promise" | "module" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { | ||
context?: string | undefined; | ||
@@ -23,7 +23,23 @@ dependencyType?: string | undefined; | ||
name: BuiltinPluginName; | ||
_options: RawExternalsPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [type: string, externals: string | RegExp | Record<string, string | boolean | string[] | Record<string, string | string[]>> | ((args_0: { | ||
context?: string | undefined; | ||
dependencyType?: string | undefined; | ||
request?: string | undefined; | ||
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "promise" | "module" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { | ||
context?: string | undefined; | ||
dependencyType?: string | undefined; | ||
request?: string | undefined; | ||
}, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>) | (string | RegExp | Record<string, string | boolean | string[] | Record<string, string | string[]>> | ((args_0: { | ||
context?: string | undefined; | ||
dependencyType?: string | undefined; | ||
request?: string | undefined; | ||
}, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | Record<string, string | string[]> | undefined, args_2: "promise" | "module" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "system" | "script" | "node-commonjs" | undefined, ...args_3: unknown[]) => void, ...args_2: unknown[]) => unknown) | ((args_0: { | ||
context?: string | undefined; | ||
dependencyType?: string | undefined; | ||
request?: string | undefined; | ||
}, ...args_1: unknown[]) => Promise<string | boolean | string[] | Record<string, string | string[]>>))[]]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: boolean; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [global: boolean]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,3 +0,3 @@ | ||
import { BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import { Compiler } from "../Compiler"; | ||
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import type { Compiler } from "../Compiler"; | ||
import { RspackBuiltinPlugin } from "./base"; | ||
@@ -4,0 +4,0 @@ export declare class HotModuleReplacementPlugin extends RspackBuiltinPlugin { |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawHtmlRspackPluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName } from "@rspack/binding"; | ||
import { z } from "../../compiled/zod"; | ||
@@ -68,5 +68,20 @@ declare const htmlRspackPluginOptions: z.ZodObject<{ | ||
name: BuiltinPluginName; | ||
_options: RawHtmlRspackPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [c?: { | ||
filename?: string | undefined; | ||
template?: string | undefined; | ||
templateContent?: string | undefined; | ||
templateParameters?: Record<string, string> | undefined; | ||
inject?: boolean | "head" | "body" | undefined; | ||
publicPath?: string | undefined; | ||
scriptLoading?: "module" | "blocking" | "defer" | undefined; | ||
chunks?: string[] | undefined; | ||
excludedChunks?: string[] | undefined; | ||
sri?: "sha256" | "sha384" | "sha512" | undefined; | ||
minify?: boolean | undefined; | ||
title?: string | undefined; | ||
favicon?: string | undefined; | ||
meta?: Record<string, string | Record<string, string>> | undefined; | ||
} | undefined]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
@@ -73,0 +88,0 @@ }; |
@@ -1,10 +0,10 @@ | ||
import { BuiltinPluginName, RawHttpExternalsRspackPluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName } from "@rspack/binding"; | ||
export declare const HttpExternalsRspackPlugin: { | ||
new (css: boolean, webAsync: boolean): { | ||
name: BuiltinPluginName; | ||
_options: RawHttpExternalsRspackPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [css: boolean, webAsync: boolean]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawIgnorePluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName, type RawIgnorePluginOptions } from "@rspack/binding"; | ||
export type IgnorePluginOptions = { | ||
@@ -11,7 +11,7 @@ resourceRegExp: NonNullable<RawIgnorePluginOptions["resourceRegExp"]>; | ||
name: BuiltinPluginName; | ||
_options: RawIgnorePluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [options: IgnorePluginOptions]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -0,1 +1,2 @@ | ||
export { RspackBuiltinPlugin } from "./base"; | ||
export * from "./APIPlugin"; | ||
@@ -6,3 +7,2 @@ export * from "./ArrayPushCallbackChunkFormatPlugin"; | ||
export * from "./BannerPlugin"; | ||
export { RspackBuiltinPlugin } from "./base"; | ||
export * from "./BundlerInfoRspackPlugin"; | ||
@@ -67,7 +67,1 @@ export * from "./ChunkPrefetchPreloadPlugin"; | ||
export * from "./FetchCompileAsyncWasmPlugin"; | ||
import { RawBuiltins } from "@rspack/binding"; | ||
import { RspackOptionsNormalized } from ".."; | ||
export interface Builtins { | ||
treeShaking?: boolean | "module"; | ||
} | ||
export declare function deprecated_resolveBuiltins(builtins: Builtins, options: RspackOptionsNormalized): RawBuiltins; |
@@ -17,3 +17,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.deprecated_resolveBuiltins = exports.RspackBuiltinPlugin = void 0; | ||
exports.RspackBuiltinPlugin = void 0; | ||
var base_1 = require("./base"); | ||
Object.defineProperty(exports, "RspackBuiltinPlugin", { enumerable: true, get: function () { return base_1.RspackBuiltinPlugin; } }); | ||
__exportStar(require("./APIPlugin"), exports); | ||
@@ -24,4 +26,2 @@ __exportStar(require("./ArrayPushCallbackChunkFormatPlugin"), exports); | ||
__exportStar(require("./BannerPlugin"), exports); | ||
var base_1 = require("./base"); | ||
Object.defineProperty(exports, "RspackBuiltinPlugin", { enumerable: true, get: function () { return base_1.RspackBuiltinPlugin; } }); | ||
__exportStar(require("./BundlerInfoRspackPlugin"), exports); | ||
@@ -86,15 +86,1 @@ __exportStar(require("./ChunkPrefetchPreloadPlugin"), exports); | ||
__exportStar(require("./FetchCompileAsyncWasmPlugin"), exports); | ||
function resolveTreeShaking(treeShaking, production) { | ||
return treeShaking !== undefined | ||
? treeShaking.toString() | ||
: production | ||
? "true" | ||
: "false"; | ||
} | ||
function deprecated_resolveBuiltins(builtins, options) { | ||
const production = options.mode === "production" || !options.mode; | ||
return { | ||
treeShaking: resolveTreeShaking(builtins.treeShaking, production) | ||
}; | ||
} | ||
exports.deprecated_resolveBuiltins = deprecated_resolveBuiltins; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import * as liteTapable from "@rspack/lite-tapable"; | ||
@@ -6,3 +6,3 @@ import { Compilation } from "../Compilation"; | ||
import Hash = require("../util/hash"); | ||
import { Chunk } from "../Chunk"; | ||
import type { Chunk } from "../Chunk"; | ||
export type CompilationHooks = { | ||
@@ -9,0 +9,0 @@ chunkHash: liteTapable.SyncHook<[Chunk, Hash]>; |
import { BuiltinPluginName } from "@rspack/binding"; | ||
import { Compiler } from "../Compiler"; | ||
import type { Compiler } from "../Compiler"; | ||
export declare const JsLoaderRspackPlugin: { | ||
new (compiler: Compiler): { | ||
name: BuiltinPluginName; | ||
_options: (context: import("@rspack/binding").JsLoaderContext) => Promise<import("@rspack/binding").JsLoaderContext>; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [compiler: Compiler]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, JsModule, RawRegex } from "@rspack/binding"; | ||
import { BuiltinPluginName, type JsModule, type RawRegex } from "@rspack/binding"; | ||
export declare const BuiltinLazyCompilationPlugin: { | ||
@@ -12,20 +12,14 @@ new (module: (args: { | ||
name: BuiltinPluginName; | ||
_options: { | ||
module: (args: { | ||
module: string; | ||
path: string; | ||
}) => { | ||
active: boolean; | ||
data: string; | ||
client: string; | ||
}; | ||
cacheable: boolean; | ||
imports: boolean; | ||
entries: boolean; | ||
test: RawRegex | ((m: JsModule) => boolean) | undefined; | ||
}; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [module: (args: { | ||
module: string; | ||
path: string; | ||
}) => { | ||
active: boolean; | ||
data: string; | ||
client: string; | ||
}, cacheable: boolean, entries: boolean, imports: boolean, test?: RawRegex | ((m: JsModule) => boolean) | undefined]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,4 +0,4 @@ | ||
import { JsModule, RawRegex } from "@rspack/binding"; | ||
import type { JsModule, RawRegex } from "@rspack/binding"; | ||
import type { Compiler } from "../.."; | ||
import { LazyCompilationDefaultBackendOptions } from "./backend"; | ||
import { type LazyCompilationDefaultBackendOptions } from "./backend"; | ||
export default class LazyCompilationPlugin { | ||
@@ -5,0 +5,0 @@ cacheable: boolean; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawLightningCssMinimizerRspackPluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName, type RawLightningCssMinimizerRspackPluginOptions } from "@rspack/binding"; | ||
export type LightningCssMinimizerRspackPluginOptions = Partial<RawLightningCssMinimizerRspackPluginOptions>; | ||
@@ -6,7 +6,7 @@ export declare const LightningCssMinimizerRspackPlugin: { | ||
name: BuiltinPluginName; | ||
_options: RawLightningCssMinimizerRspackPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [options?: Partial<RawLightningCssMinimizerRspackPluginOptions> | undefined]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawLimitChunkCountPluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName } from "@rspack/binding"; | ||
export type LimitChunkCountOptions = { | ||
@@ -10,7 +10,7 @@ chunkOverhead?: number; | ||
name: BuiltinPluginName; | ||
_options: RawLimitChunkCountPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [options: LimitChunkCountOptions]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: boolean; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [deterministic: boolean]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: undefined; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawProgressPluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName, type RawProgressPluginOptions } from "@rspack/binding"; | ||
export type ProgressPluginArgument = Partial<RawProgressPluginOptions> | undefined; | ||
@@ -6,7 +6,7 @@ export declare const ProgressPlugin: { | ||
name: BuiltinPluginName; | ||
_options: RawProgressPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [progress?: ProgressPluginArgument]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -6,7 +6,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: Record<string, string[]>; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [provide: ProvidePluginOptions]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawRuntimeChunkOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName, type RawRuntimeChunkOptions } from "@rspack/binding"; | ||
export type RuntimeChunkPluginOptions = RawRuntimeChunkOptions; | ||
@@ -6,7 +6,7 @@ export declare const RuntimeChunkPlugin: { | ||
name: BuiltinPluginName; | ||
_options: RawRuntimeChunkOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [options: RawRuntimeChunkOptions]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawSizeLimitsPluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName } from "@rspack/binding"; | ||
export declare const SizeLimitsPlugin: { | ||
@@ -10,7 +10,12 @@ new (options: { | ||
name: BuiltinPluginName; | ||
_options: RawSizeLimitsPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [options: { | ||
assetFilter?: ((args_0: string, ...args_1: unknown[]) => boolean) | undefined; | ||
hints?: false | "error" | "warning" | undefined; | ||
maxAssetSize?: number | undefined; | ||
maxEntrypointSize?: number | undefined; | ||
}]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawSourceMapDevToolPluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName, type RawSourceMapDevToolPluginOptions } from "@rspack/binding"; | ||
/** | ||
@@ -18,5 +18,5 @@ * Include source maps for modules based on their extension (defaults to .js and .css). | ||
name: BuiltinPluginName; | ||
_options: RawSourceMapDevToolPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [options: SourceMapDevToolPluginOptions]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
@@ -23,0 +23,0 @@ }; |
@@ -1,4 +0,4 @@ | ||
import { BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import { Compiler } from "../Compiler"; | ||
import { type OptimizationSplitChunksOptions } from "../config/zod"; | ||
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import type { Compiler } from "../Compiler"; | ||
import type { OptimizationSplitChunksOptions } from "../config/zod"; | ||
import { RspackBuiltinPlugin } from "./base"; | ||
@@ -5,0 +5,0 @@ export declare class SplitChunksPlugin extends RspackBuiltinPlugin { |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: undefined; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [options?: any]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,2 +0,2 @@ | ||
import { BuiltinPluginName, RawSwcJsMinimizerRspackPluginOptions } from "@rspack/binding"; | ||
import { BuiltinPluginName } from "@rspack/binding"; | ||
type MinifyCondition = string | RegExp; | ||
@@ -206,5 +206,5 @@ type MinifyConditions = MinifyCondition | MinifyCondition[]; | ||
name: BuiltinPluginName; | ||
_options: RawSwcJsMinimizerRspackPluginOptions; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: [options?: SwcJsMinimizerRspackPluginOptions | undefined]; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
@@ -211,0 +211,0 @@ }; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: undefined; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
@@ -1,4 +0,4 @@ | ||
import { BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import { Compiler } from "../Compiler"; | ||
import { ChunkLoading, OutputModule, WasmLoading, WorkerPublicPath } from "../config"; | ||
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import type { Compiler } from "../Compiler"; | ||
import type { ChunkLoading, OutputModule, WasmLoading, WorkerPublicPath } from "../config"; | ||
import { RspackBuiltinPlugin } from "./base"; | ||
@@ -5,0 +5,0 @@ export declare class WorkerPlugin extends RspackBuiltinPlugin { |
import { Chunk } from "./Chunk"; | ||
import { Compilation } from "./Compilation"; | ||
import type { Compilation } from "./Compilation"; | ||
import { Module } from "./Module"; | ||
@@ -4,0 +4,0 @@ export declare class ChunkGraph { |
@@ -13,13 +13,13 @@ /** | ||
import * as liteTapable from "@rspack/lite-tapable"; | ||
import { Source } from "../compiled/webpack-sources"; | ||
import { ContextModuleFactory } from "./ContextModuleFactory"; | ||
import { Filename, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance, StatsOptions, StatsValue } from "./config"; | ||
import ResolverFactory = require("./ResolverFactory"); | ||
import type { Source } from "../compiled/webpack-sources"; | ||
import { Chunk } from "./Chunk"; | ||
import { ChunkGraph } from "./ChunkGraph"; | ||
import { Compiler } from "./Compiler"; | ||
import type { Compiler } from "./Compiler"; | ||
import type { ContextModuleFactory } from "./ContextModuleFactory"; | ||
import { Entrypoint } from "./Entrypoint"; | ||
import { CodeGenerationResult, Module } from "./Module"; | ||
import { NormalModuleFactory } from "./NormalModuleFactory"; | ||
import { Stats, StatsAsset, StatsError, StatsModule } from "./Stats"; | ||
import { type CodeGenerationResult, Module } from "./Module"; | ||
import type { NormalModuleFactory } from "./NormalModuleFactory"; | ||
import type { ResolverFactory } from "./ResolverFactory"; | ||
import { Stats, type StatsAsset, type StatsError, type StatsModule } from "./Stats"; | ||
import type { Filename, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance, StatsOptions, StatsValue } from "./config"; | ||
import { Logger } from "./logging/Logger"; | ||
@@ -30,3 +30,3 @@ import { StatsFactory } from "./stats/StatsFactory"; | ||
import Hash = require("./util/hash"); | ||
import { RspackError } from "./RspackError"; | ||
import { type RspackError } from "./RspackError"; | ||
export { type AssetInfo } from "./util/AssetInfo"; | ||
@@ -33,0 +33,0 @@ export type Assets = Record<string, Source>; |
@@ -39,3 +39,3 @@ "use strict"; | ||
}; | ||
var _Compilation_instances, _Compilation_inner, _Compilation_cachedAssets, _Compilation_customModules, _Compilation_createCachedAssets, _Compilation_rebuildModuleCaller; | ||
var _Compilation_instances, _Compilation_inner, _Compilation_cachedAssets, _Compilation_cachedEntrypoints, _Compilation_customModules, _Compilation_createCachedAssets, _Compilation_rebuildModuleCaller; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -65,2 +65,3 @@ exports.Compilation = void 0; | ||
_Compilation_cachedAssets.set(this, void 0); | ||
_Compilation_cachedEntrypoints.set(this, void 0); | ||
this.fileSystemInfo = { | ||
@@ -81,19 +82,16 @@ createSnapshot() { | ||
this.buildDependencies = (0, fake_1.createFakeCompilationDependencies)(() => __classPrivateFieldGet(this, _Compilation_inner, "f").getBuildDependencies(), d => __classPrivateFieldGet(this, _Compilation_inner, "f").addBuildDependencies(d)); | ||
_Compilation_rebuildModuleCaller.set(this, (function (compilation) { | ||
return new MergeCaller_1.default((args) => { | ||
__classPrivateFieldGet(compilation, _Compilation_inner, "f").rebuildModule(args.map(item => item[0]), function (err, modules) { | ||
for (const [id, callback] of args) { | ||
const m = modules.find(item => item.moduleIdentifier === id); | ||
if (m) { | ||
callback(err, Module_1.Module.__from_binding(m, compilation)); | ||
} | ||
else { | ||
callback(err || new Error("module no found"), null); | ||
} | ||
_Compilation_rebuildModuleCaller.set(this, ((compilation) => new MergeCaller_1.default((args) => { | ||
__classPrivateFieldGet(compilation, _Compilation_inner, "f").rebuildModule(args.map(item => item[0]), (err, modules) => { | ||
for (const [id, callback] of args) { | ||
const m = modules.find(item => item.moduleIdentifier === id); | ||
if (m) { | ||
callback(err, Module_1.Module.__from_binding(m, compilation)); | ||
} | ||
}); | ||
}, 10); | ||
})(this)); | ||
else { | ||
callback(err || new Error("module no found"), null); | ||
} | ||
} | ||
}); | ||
}, 10))(this)); | ||
__classPrivateFieldSet(this, _Compilation_inner, inner, "f"); | ||
__classPrivateFieldSet(this, _Compilation_cachedAssets, __classPrivateFieldGet(this, _Compilation_instances, "m", _Compilation_createCachedAssets).call(this), "f"); | ||
__classPrivateFieldSet(this, _Compilation_customModules, {}, "f"); | ||
@@ -188,2 +186,5 @@ const processAssetsHook = new liteTapable.AsyncSeriesHook([ | ||
get assets() { | ||
if (!__classPrivateFieldGet(this, _Compilation_cachedAssets, "f")) { | ||
__classPrivateFieldSet(this, _Compilation_cachedAssets, __classPrivateFieldGet(this, _Compilation_instances, "m", _Compilation_createCachedAssets).call(this), "f"); | ||
} | ||
return __classPrivateFieldGet(this, _Compilation_cachedAssets, "f"); | ||
@@ -195,6 +196,9 @@ } | ||
get entrypoints() { | ||
return new Map(Object.entries(__classPrivateFieldGet(this, _Compilation_inner, "f").entrypoints).map(([n, e]) => [ | ||
n, | ||
Entrypoint_1.Entrypoint.__from_binding(e, __classPrivateFieldGet(this, _Compilation_inner, "f")) | ||
])); | ||
if (!__classPrivateFieldGet(this, _Compilation_cachedEntrypoints, "f")) { | ||
__classPrivateFieldSet(this, _Compilation_cachedEntrypoints, new Map(Object.entries(__classPrivateFieldGet(this, _Compilation_inner, "f").entrypoints).map(([n, e]) => [ | ||
n, | ||
Entrypoint_1.Entrypoint.__from_binding(e, __classPrivateFieldGet(this, _Compilation_inner, "f")) | ||
])), "f"); | ||
} | ||
return __classPrivateFieldGet(this, _Compilation_cachedEntrypoints, "f"); | ||
} | ||
@@ -692,3 +696,3 @@ get modules() { | ||
} | ||
_Compilation_inner = new WeakMap(), _Compilation_cachedAssets = new WeakMap(), _Compilation_customModules = new WeakMap(), _Compilation_rebuildModuleCaller = new WeakMap(), _Compilation_instances = new WeakSet(), _Compilation_createCachedAssets = function _Compilation_createCachedAssets() { | ||
_Compilation_inner = new WeakMap(), _Compilation_cachedAssets = new WeakMap(), _Compilation_cachedEntrypoints = new WeakMap(), _Compilation_customModules = new WeakMap(), _Compilation_rebuildModuleCaller = new WeakMap(), _Compilation_instances = new WeakSet(), _Compilation_createCachedAssets = function _Compilation_createCachedAssets() { | ||
return new Proxy({}, { | ||
@@ -695,0 +699,0 @@ get: (_, property) => { |
@@ -14,18 +14,18 @@ /// <reference types="node" /> | ||
import type Watchpack from "../compiled/watchpack"; | ||
import { Compilation, CompilationParams } from "./Compilation"; | ||
import { Compilation, type CompilationParams } from "./Compilation"; | ||
import { ContextModuleFactory } from "./ContextModuleFactory"; | ||
import { RuleSetCompiler } from "./RuleSetCompiler"; | ||
import { Stats } from "./Stats"; | ||
import { EntryNormalized, OutputNormalized, RspackOptionsNormalized, RspackPluginInstance } from "./config"; | ||
import { type EntryNormalized, type OutputNormalized, type RspackOptionsNormalized, type RspackPluginInstance } from "./config"; | ||
import { rspack } from "./index"; | ||
import ResolverFactory = require("./ResolverFactory"); | ||
import Cache = require("./lib/Cache"); | ||
import CacheFacade = require("./lib/CacheFacade"); | ||
import { Source } from "../compiled/webpack-sources"; | ||
import type { Source } from "../compiled/webpack-sources"; | ||
import { Chunk } from "./Chunk"; | ||
import { FileSystemInfoEntry } from "./FileSystemInfo"; | ||
import type { FileSystemInfoEntry } from "./FileSystemInfo"; | ||
import { NormalModuleFactory } from "./NormalModuleFactory"; | ||
import { ResolverFactory } from "./ResolverFactory"; | ||
import { Watching } from "./Watching"; | ||
import { Logger } from "./logging/Logger"; | ||
import { OutputFileSystem, WatchFileSystem } from "./util/fs"; | ||
import type { OutputFileSystem, WatchFileSystem } from "./util/fs"; | ||
export interface AssetEmittedInfo { | ||
@@ -32,0 +32,0 @@ content: Buffer; |
@@ -55,9 +55,8 @@ "use strict"; | ||
const ContextModuleFactory_1 = require("./ContextModuleFactory"); | ||
const FileSystem_1 = require("./FileSystem"); | ||
const RuleSetCompiler_1 = require("./RuleSetCompiler"); | ||
const Stats_1 = require("./Stats"); | ||
const config_1 = require("./config"); | ||
const ConcurrentCompilationError_1 = __importDefault(require("./error/ConcurrentCompilationError")); | ||
const index_1 = require("./index"); | ||
const ResolverFactory = require("./ResolverFactory"); | ||
const FileSystem_1 = require("./FileSystem"); | ||
const ConcurrentCompilationError_1 = __importDefault(require("./error/ConcurrentCompilationError")); | ||
const Cache = require("./lib/Cache"); | ||
@@ -69,2 +68,3 @@ const CacheFacade = require("./lib/CacheFacade"); | ||
const NormalModuleFactory_1 = require("./NormalModuleFactory"); | ||
const ResolverFactory_1 = require("./ResolverFactory"); | ||
const RuntimeGlobals_1 = require("./RuntimeGlobals"); | ||
@@ -149,4 +149,4 @@ const Watching_1 = require("./Watching"); | ||
this.records = {}; | ||
this.resolverFactory = new ResolverFactory(); | ||
this.options = options; | ||
this.resolverFactory = new ResolverFactory_1.ResolverFactory(); | ||
this.context = context; | ||
@@ -408,3 +408,2 @@ this.cache = new Cache(); | ||
childCompiler.outputFileSystem = null; | ||
childCompiler.resolverFactory = this.resolverFactory; | ||
childCompiler.modifiedFiles = this.modifiedFiles; | ||
@@ -793,3 +792,3 @@ childCompiler.removedFiles = this.removedFiles; | ||
}, "f"); | ||
__classPrivateFieldSet(this, _Compiler_instance, new instanceBinding.Rspack(rawOptions, __classPrivateFieldGet(this, _Compiler_builtinPlugins, "f"), __classPrivateFieldGet(this, _Compiler_registers, "f"), FileSystem_1.ThreadsafeWritableNodeFS.__to_binding(this.outputFileSystem)), "f"); | ||
__classPrivateFieldSet(this, _Compiler_instance, new instanceBinding.Rspack(rawOptions, __classPrivateFieldGet(this, _Compiler_builtinPlugins, "f"), __classPrivateFieldGet(this, _Compiler_registers, "f"), FileSystem_1.ThreadsafeWritableNodeFS.__to_binding(this.outputFileSystem), ResolverFactory_1.ResolverFactory.__to_binding(this.resolverFactory)), "f"); | ||
callback(null, __classPrivateFieldGet(this, _Compiler_instance, "f")); | ||
@@ -796,0 +795,0 @@ }, _Compiler_updateNonSkippableRegisters = function _Compiler_updateNonSkippableRegisters() { |
import type { RawLibraryOptions, RawOptions } from "@rspack/binding"; | ||
import { Compiler } from "../Compiler"; | ||
import { LoaderContext, LoaderDefinition, LoaderDefinitionFunction } from "./adapterRuleUse"; | ||
import { RspackOptionsNormalized } from "./normalization"; | ||
import { ChunkLoading, LibraryOptions } from "./zod"; | ||
import type { Compiler } from "../Compiler"; | ||
import { type LoaderContext, type LoaderDefinition, type LoaderDefinitionFunction } from "./adapterRuleUse"; | ||
import type { RspackOptionsNormalized } from "./normalization"; | ||
import { type ChunkLoading, type LibraryOptions, type Resolve } from "./zod"; | ||
export type { LoaderContext, LoaderDefinition, LoaderDefinitionFunction }; | ||
export declare const getRawOptions: (options: RspackOptionsNormalized, compiler: Compiler) => RawOptions; | ||
export declare function getRawResolve(resolve: Resolve): RawOptions["resolve"]; | ||
export declare function getRawLibrary(library: LibraryOptions): RawLibraryOptions; | ||
export declare function getRawChunkLoading(chunkLoading: ChunkLoading): string; |
@@ -6,3 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getRawChunkLoading = exports.getRawLibrary = exports.getRawOptions = void 0; | ||
exports.getRawChunkLoading = exports.getRawLibrary = exports.getRawResolve = exports.getRawOptions = void 0; | ||
const assert_1 = __importDefault(require("assert")); | ||
@@ -110,2 +110,3 @@ const Stats_1 = require("../Stats"); | ||
} | ||
exports.getRawResolve = getRawResolve; | ||
function getRawCrossOriginLoading(crossOriginLoading) { | ||
@@ -330,3 +331,3 @@ if (typeof crossOriginLoading === "boolean") { | ||
delete rawModuleRule.resourceFragment; | ||
rawModuleRule.rspackResource = getRawRuleSetCondition(function (resourceQueryFragment) { | ||
rawModuleRule.rspackResource = getRawRuleSetCondition(resourceQueryFragment => { | ||
const { path, query, fragment } = (0, identifier_1.parseResource)(resourceQueryFragment); | ||
@@ -333,0 +334,0 @@ if (rule.test && !tryMatch(path, rule.test)) { |
/// <reference types="node" /> | ||
import type { JsAssetInfo, RawModuleRuleUse, RawOptions } from "@rspack/binding"; | ||
import { ResolveRequest } from "../../compiled/enhanced-resolve"; | ||
import { Compiler } from "../Compiler"; | ||
import { Logger } from "../logging/Logger"; | ||
import type { ResolveRequest } from "../../compiled/enhanced-resolve"; | ||
import type { Compiler } from "../Compiler"; | ||
import type { Logger } from "../logging/Logger"; | ||
import Hash = require("../util/hash"); | ||
import { Compilation } from "../Compilation"; | ||
import { Module } from "../Module"; | ||
import { LoaderObject } from "../loader-runner"; | ||
import { Mode, Resolve, RuleSetUseItem, Target } from "./zod"; | ||
import type { Compilation } from "../Compilation"; | ||
import type { Module } from "../Module"; | ||
import { type LoaderObject } from "../loader-runner"; | ||
import type { Mode, Resolve, RuleSetUseItem, Target } from "./zod"; | ||
export declare const BUILTIN_LOADER_PREFIX = "builtin:"; | ||
@@ -12,0 +12,0 @@ export interface ComposeJsUseOptions { |
@@ -10,4 +10,4 @@ /** | ||
*/ | ||
import { RspackOptionsNormalized } from "./normalization"; | ||
import type { RspackOptionsNormalized } from "./normalization"; | ||
export declare const applyRspackOptionsDefaults: (options: RspackOptionsNormalized) => void; | ||
export declare const applyRspackOptionsBaseDefaults: (options: RspackOptionsNormalized) => void; |
@@ -262,3 +262,2 @@ "use strict"; | ||
}); | ||
const resolve = resolveOptions; | ||
//#endregion | ||
@@ -919,4 +918,4 @@ //#region Module | ||
optimization: optimization.optional(), | ||
resolve: resolve.optional(), | ||
resolveLoader: resolve.optional(), | ||
resolve: resolveOptions.optional(), | ||
resolveLoader: resolveOptions.optional(), | ||
plugins: plugins.optional(), | ||
@@ -923,0 +922,0 @@ devServer: devServer.optional(), |
@@ -1,5 +0,5 @@ | ||
import { BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import { Compiler } from "../Compiler"; | ||
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import type { Compiler } from "../Compiler"; | ||
import { RspackBuiltinPlugin } from "../builtin-plugin/base"; | ||
import { EntryRuntime, FilenameTemplate, LibraryOptions } from "../config"; | ||
import { type EntryRuntime, type FilenameTemplate, type LibraryOptions } from "../config"; | ||
export type ContainerPluginOptions = { | ||
@@ -6,0 +6,0 @@ exposes: Exposes; |
@@ -1,5 +0,5 @@ | ||
import { BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import { Compiler } from "../Compiler"; | ||
import { type BuiltinPlugin, BuiltinPluginName } from "@rspack/binding"; | ||
import type { Compiler } from "../Compiler"; | ||
import { RspackBuiltinPlugin } from "../builtin-plugin/base"; | ||
import { ExternalsType } from "../config"; | ||
import type { ExternalsType } from "../config"; | ||
export type ContainerReferencePluginOptions = { | ||
@@ -24,3 +24,3 @@ remoteType: ExternalsType; | ||
_options: { | ||
remoteType: "commonjs" | "umd" | "amd" | "promise" | "global" | "jsonp" | "import" | "commonjs2" | "var" | "module" | "assign" | "this" | "window" | "self" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "system" | "script" | "node-commonjs"; | ||
remoteType: "promise" | "module" | "commonjs" | "umd" | "amd" | "jsonp" | "import" | "commonjs2" | "var" | "assign" | "this" | "window" | "self" | "global" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "system" | "script" | "node-commonjs"; | ||
remotes: [string, { | ||
@@ -27,0 +27,0 @@ external: string[]; |
@@ -1,1 +0,1 @@ | ||
var __module_federation_bundler_runtime__,__module_federation_runtime_plugins__,__module_federation_remote_infos__,__module_federation_container_name__;module.exports=function(){if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){obj[key]??=[];obj[key].push(...value)}else if(typeof value==="object"&&value!==null){obj[key]??={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{obj[key]??=initial()};const remotesLoadingChunkMapping=__webpack_require__.remotesLoadingData?.chunkMapping??{};const remotesLoadingModuleIdToRemoteDataMapping=__webpack_require__.remotesLoadingData?.moduleIdToRemoteDataMapping??{};const initializeSharingScopeToInitDataMapping=__webpack_require__.initializeSharingData?.scopeToSharingDataMapping??{};const consumesLoadingChunkMapping=__webpack_require__.consumesLoadingData?.chunkMapping??{};const consumesLoadingModuleToConsumeDataMapping=__webpack_require__.consumesLoadingData?.moduleIdToConsumeDataMapping??{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens=[];const containerShareScope=__webpack_require__.initializeExposesData?.shareScope;for(const key in __module_federation_bundler_runtime__){__webpack_require__.federation[key]=__module_federation_bundler_runtime__[key]}early(__webpack_require__.federation,"consumesLoadingModuleToHandlerMapping",(()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){consumesLoadingModuleToHandlerMapping[moduleId]={getter:data.fallback,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey}}return consumesLoadingModuleToHandlerMapping}));early(__webpack_require__.federation,"initOptions",(()=>({})));early(__webpack_require__.federation.initOptions,"name",(()=>__module_federation_container_name__));early(__webpack_require__.federation.initOptions,"shared",(()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage==="object"&&stage!==null){const{name:name,version:version,factory:factory,eager:eager}=stage;const options={version:version,scope:[scope],get:factory};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared}));merge(__webpack_require__.federation.initOptions,"remotes",(()=>Object.values(__module_federation_remote_infos__).flat().filter((remote=>remote.externalType==="script"))));merge(__webpack_require__.federation.initOptions,"plugins",(()=>__module_federation_runtime_plugins__));early(__webpack_require__.federation,"bundlerRuntimeOptions",(()=>({})));early(__webpack_require__.federation.bundlerRuntimeOptions,"remotes",(()=>({})));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"chunkMapping",(()=>remotesLoadingChunkMapping));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",(()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping}));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"webpackRequire",(()=>__webpack_require__));merge(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",(()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap}));override(__webpack_require__,"S",__webpack_require__.federation.bundlerRuntime.S);if(__webpack_require__.federation.attachShareScopeMap){__webpack_require__.federation.attachShareScopeMap(__webpack_require__)}override(__webpack_require__.f,"remotes",((chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.remotes({chunkId:chunkId,promises:promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:__webpack_require__})));override(__webpack_require__.f,"consumes",((chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.consumes({chunkId:chunkId,promises:promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:__webpack_require__})));override(__webpack_require__,"I",((name,initScope)=>__webpack_require__.federation.bundlerRuntime.I({shareScopeName:name,initScope:initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:__webpack_require__})));override(__webpack_require__,"initContainer",((shareScope,initScope,remoteEntryInitOptions)=>__webpack_require__.federation.bundlerRuntime.initContainerEntry({shareScope:shareScope,initScope:initScope,remoteEntryInitOptions:remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:__webpack_require__})));override(__webpack_require__,"getContainer",((module,getScope)=>{var moduleMap=__webpack_require__.initializeExposesData.moduleMap;__webpack_require__.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module)?moduleMap[module]():Promise.resolve().then((()=>{throw new Error('Module "'+module+'" does not exist in container.')}));__webpack_require__.R=undefined;return getScope}));__webpack_require__.federation.instance=__webpack_require__.federation.runtime.init(__webpack_require__.federation.initOptions);if(__webpack_require__.consumesLoadingData?.initialConsumes){__webpack_require__.federation.bundlerRuntime.installInitialConsumes({webpackRequire:__webpack_require__,installedModules:consumesLoadinginstalledModules,initialConsumes:__webpack_require__.consumesLoadingData.initialConsumes,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping})}}}; | ||
var __module_federation_bundler_runtime__,__module_federation_runtime_plugins__,__module_federation_remote_infos__,__module_federation_container_name__;module.exports=function(){if((__webpack_require__.initializeSharingData||__webpack_require__.initializeExposesData)&&__webpack_require__.federation){var __webpack_require___remotesLoadingData,__webpack_require___remotesLoadingData1,__webpack_require___initializeSharingData,__webpack_require___consumesLoadingData,__webpack_require___consumesLoadingData1,__webpack_require___initializeExposesData,__webpack_require___consumesLoadingData2;const override=(obj,key,value)=>{if(!obj)return;if(obj[key])obj[key]=value};const merge=(obj,key,fn)=>{const value=fn();if(Array.isArray(value)){var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=[];obj[key].push(...value)}else if(typeof value==="object"&&value!==null){var _obj1,_key1;var _1;(_1=(_obj1=obj)[_key1=key])!==null&&_1!==void 0?_1:_obj1[_key1]={};Object.assign(obj[key],value)}};const early=(obj,key,initial)=>{var _obj,_key;var _;(_=(_obj=obj)[_key=key])!==null&&_!==void 0?_:_obj[_key]=initial()};var __webpack_require___remotesLoadingData_chunkMapping;const remotesLoadingChunkMapping=(__webpack_require___remotesLoadingData_chunkMapping=(__webpack_require___remotesLoadingData=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData===void 0?void 0:__webpack_require___remotesLoadingData.chunkMapping)!==null&&__webpack_require___remotesLoadingData_chunkMapping!==void 0?__webpack_require___remotesLoadingData_chunkMapping:{};var __webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping;const remotesLoadingModuleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping=(__webpack_require___remotesLoadingData1=__webpack_require__.remotesLoadingData)===null||__webpack_require___remotesLoadingData1===void 0?void 0:__webpack_require___remotesLoadingData1.moduleIdToRemoteDataMapping)!==null&&__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping!==void 0?__webpack_require___remotesLoadingData_moduleIdToRemoteDataMapping:{};var __webpack_require___initializeSharingData_scopeToSharingDataMapping;const initializeSharingScopeToInitDataMapping=(__webpack_require___initializeSharingData_scopeToSharingDataMapping=(__webpack_require___initializeSharingData=__webpack_require__.initializeSharingData)===null||__webpack_require___initializeSharingData===void 0?void 0:__webpack_require___initializeSharingData.scopeToSharingDataMapping)!==null&&__webpack_require___initializeSharingData_scopeToSharingDataMapping!==void 0?__webpack_require___initializeSharingData_scopeToSharingDataMapping:{};var __webpack_require___consumesLoadingData_chunkMapping;const consumesLoadingChunkMapping=(__webpack_require___consumesLoadingData_chunkMapping=(__webpack_require___consumesLoadingData=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData===void 0?void 0:__webpack_require___consumesLoadingData.chunkMapping)!==null&&__webpack_require___consumesLoadingData_chunkMapping!==void 0?__webpack_require___consumesLoadingData_chunkMapping:{};var __webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping;const consumesLoadingModuleToConsumeDataMapping=(__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping=(__webpack_require___consumesLoadingData1=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData1===void 0?void 0:__webpack_require___consumesLoadingData1.moduleIdToConsumeDataMapping)!==null&&__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping!==void 0?__webpack_require___consumesLoadingData_moduleIdToConsumeDataMapping:{};const consumesLoadinginstalledModules={};const initializeSharingInitPromises=[];const initializeSharingInitTokens=[];const containerShareScope=(__webpack_require___initializeExposesData=__webpack_require__.initializeExposesData)===null||__webpack_require___initializeExposesData===void 0?void 0:__webpack_require___initializeExposesData.shareScope;for(const key in __module_federation_bundler_runtime__){__webpack_require__.federation[key]=__module_federation_bundler_runtime__[key]}early(__webpack_require__.federation,"consumesLoadingModuleToHandlerMapping",()=>{const consumesLoadingModuleToHandlerMapping={};for(let[moduleId,data]of Object.entries(consumesLoadingModuleToConsumeDataMapping)){consumesLoadingModuleToHandlerMapping[moduleId]={getter:data.fallback,shareInfo:{shareConfig:{fixedDependencies:false,requiredVersion:data.requiredVersion,strictVersion:data.strictVersion,singleton:data.singleton,eager:data.eager},scope:[data.shareScope]},shareKey:data.shareKey}}return consumesLoadingModuleToHandlerMapping});early(__webpack_require__.federation,"initOptions",()=>({}));early(__webpack_require__.federation.initOptions,"name",()=>__module_federation_container_name__);early(__webpack_require__.federation.initOptions,"shared",()=>{const shared={};for(let[scope,stages]of Object.entries(initializeSharingScopeToInitDataMapping)){for(let stage of stages){if(typeof stage==="object"&&stage!==null){const{name,version,factory,eager}=stage;const options={version,scope:[scope],get:factory};if(shared[name]){shared[name].push(options)}else{shared[name]=[options]}}}}return shared});merge(__webpack_require__.federation.initOptions,"remotes",()=>Object.values(__module_federation_remote_infos__).flat().filter(remote=>remote.externalType==="script"));merge(__webpack_require__.federation.initOptions,"plugins",()=>__module_federation_runtime_plugins__);early(__webpack_require__.federation,"bundlerRuntimeOptions",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions,"remotes",()=>({}));early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"chunkMapping",()=>remotesLoadingChunkMapping);early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"idToExternalAndNameMapping",()=>{const remotesLoadingIdToExternalAndNameMappingMapping={};for(let[moduleId,data]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){remotesLoadingIdToExternalAndNameMappingMapping[moduleId]=[data.shareScope,data.name,data.externalModuleId,data.remoteName]}return remotesLoadingIdToExternalAndNameMappingMapping});early(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"webpackRequire",()=>__webpack_require__);merge(__webpack_require__.federation.bundlerRuntimeOptions.remotes,"idToRemoteMap",()=>{const idToRemoteMap={};for(let[id,remoteData]of Object.entries(remotesLoadingModuleIdToRemoteDataMapping)){const info=__module_federation_remote_infos__[remoteData.remoteName];if(info)idToRemoteMap[id]=info}return idToRemoteMap});override(__webpack_require__,"S",__webpack_require__.federation.bundlerRuntime.S);if(__webpack_require__.federation.attachShareScopeMap){__webpack_require__.federation.attachShareScopeMap(__webpack_require__)}override(__webpack_require__.f,"remotes",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.remotes({chunkId,promises,chunkMapping:remotesLoadingChunkMapping,idToExternalAndNameMapping:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToExternalAndNameMapping,idToRemoteMap:__webpack_require__.federation.bundlerRuntimeOptions.remotes.idToRemoteMap,webpackRequire:__webpack_require__}));override(__webpack_require__.f,"consumes",(chunkId,promises)=>__webpack_require__.federation.bundlerRuntime.consumes({chunkId,promises,chunkMapping:consumesLoadingChunkMapping,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping,installedModules:consumesLoadinginstalledModules,webpackRequire:__webpack_require__}));override(__webpack_require__,"I",(name,initScope)=>__webpack_require__.federation.bundlerRuntime.I({shareScopeName:name,initScope,initPromises:initializeSharingInitPromises,initTokens:initializeSharingInitTokens,webpackRequire:__webpack_require__}));override(__webpack_require__,"initContainer",(shareScope,initScope,remoteEntryInitOptions)=>__webpack_require__.federation.bundlerRuntime.initContainerEntry({shareScope,initScope,remoteEntryInitOptions,shareScopeKey:containerShareScope,webpackRequire:__webpack_require__}));override(__webpack_require__,"getContainer",(module1,getScope)=>{var moduleMap=__webpack_require__.initializeExposesData.moduleMap;__webpack_require__.R=getScope;getScope=Object.prototype.hasOwnProperty.call(moduleMap,module1)?moduleMap[module1]():Promise.resolve().then(()=>{throw new Error('Module "'+module1+'" does not exist in container.')});__webpack_require__.R=undefined;return getScope});__webpack_require__.federation.instance=__webpack_require__.federation.runtime.init(__webpack_require__.federation.initOptions);if((__webpack_require___consumesLoadingData2=__webpack_require__.consumesLoadingData)===null||__webpack_require___consumesLoadingData2===void 0?void 0:__webpack_require___consumesLoadingData2.initialConsumes){__webpack_require__.federation.bundlerRuntime.installInitialConsumes({webpackRequire:__webpack_require__,installedModules:consumesLoadinginstalledModules,initialConsumes:__webpack_require__.consumesLoadingData.initialConsumes,moduleToHandlerMapping:__webpack_require__.federation.consumesLoadingModuleToHandlerMapping})}}}; |
@@ -1,3 +0,3 @@ | ||
import { Compiler } from "../Compiler"; | ||
import { type ModuleFederationPluginV1Options } from "./ModuleFederationPluginV1"; | ||
import type { Compiler } from "../Compiler"; | ||
import type { ModuleFederationPluginV1Options } from "./ModuleFederationPluginV1"; | ||
export interface ModuleFederationPluginOptions extends Omit<ModuleFederationPluginV1Options, "enhanced"> { | ||
@@ -4,0 +4,0 @@ runtimePlugins?: RuntimePlugins; |
@@ -1,6 +0,6 @@ | ||
import { Compiler } from "../Compiler"; | ||
import { EntryRuntime, ExternalsType, LibraryOptions } from "../config"; | ||
import { Shared } from "../sharing/SharePlugin"; | ||
import { Exposes } from "./ContainerPlugin"; | ||
import { Remotes } from "./ContainerReferencePlugin"; | ||
import type { Compiler } from "../Compiler"; | ||
import { type EntryRuntime, type ExternalsType, type LibraryOptions } from "../config"; | ||
import { type Shared } from "../sharing/SharePlugin"; | ||
import { type Exposes } from "./ContainerPlugin"; | ||
import { type Remotes } from "./ContainerReferencePlugin"; | ||
export interface ModuleFederationPluginV1Options { | ||
@@ -7,0 +7,0 @@ exposes?: Exposes; |
@@ -5,7 +5,7 @@ import { BuiltinPluginName } from "@rspack/binding"; | ||
name: BuiltinPluginName; | ||
_options: void; | ||
affectedHooks: "make" | "compile" | "emit" | "afterEmit" | "invalid" | "done" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(): import("@rspack/binding").BuiltinPlugin; | ||
_args: []; | ||
affectedHooks: "done" | "compilation" | "failed" | "environment" | "emit" | "make" | "compile" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "shutdown" | "watchRun" | "watchClose" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined; | ||
raw(compiler: import("../Compiler").Compiler): import("@rspack/binding").BuiltinPlugin; | ||
apply(compiler: import("../Compiler").Compiler): void; | ||
}; | ||
}; |
import * as liteTapable from "@rspack/lite-tapable"; | ||
import { ContextModuleFactoryAfterResolveResult, ContextModuleFactoryBeforeResolveResult } from "./Module"; | ||
import type { ContextModuleFactoryAfterResolveResult, ContextModuleFactoryBeforeResolveResult } from "./Module"; | ||
export declare class ContextModuleFactory { | ||
@@ -4,0 +4,0 @@ hooks: { |
/// <reference types="node" /> | ||
import { ThreadsafeNodeFS } from "@rspack/binding"; | ||
import { OutputFileSystem } from "./util/fs"; | ||
import type { ThreadsafeNodeFS } from "@rspack/binding"; | ||
import { type OutputFileSystem } from "./util/fs"; | ||
declare class ThreadsafeWritableNodeFS implements ThreadsafeNodeFS { | ||
@@ -5,0 +5,0 @@ writeFile: (name: string, content: Buffer) => Promise<void> | void; |
@@ -10,4 +10,4 @@ /** | ||
*/ | ||
import { Compiler, EntryDescriptionNormalized, EntryNormalized } from ".."; | ||
import { EntryOptions } from "../builtin-plugin"; | ||
import type { Compiler, EntryDescriptionNormalized, EntryNormalized } from ".."; | ||
import { type EntryOptions } from "../builtin-plugin"; | ||
export default class EntryOptionPlugin { | ||
@@ -14,0 +14,0 @@ apply(compiler: Compiler): void; |
@@ -6,4 +6,4 @@ /** | ||
*/ | ||
import { Compiler } from "../Compiler"; | ||
import { ResolveData } from "../Module"; | ||
import type { Compiler } from "../Compiler"; | ||
import type { ResolveData } from "../Module"; | ||
type ModuleReplacer = (createData: ResolveData) => void; | ||
@@ -10,0 +10,0 @@ export declare class NormalModuleReplacementPlugin { |
@@ -10,4 +10,4 @@ /** | ||
*/ | ||
import { JsLoaderContext, JsLoaderItem } from "@rspack/binding"; | ||
import { Compiler } from "../Compiler"; | ||
import { type JsLoaderContext, type JsLoaderItem } from "@rspack/binding"; | ||
import type { Compiler } from "../Compiler"; | ||
export declare class LoaderObject { | ||
@@ -14,0 +14,0 @@ #private; |
@@ -58,8 +58,6 @@ "use strict"; | ||
enumerable: true, | ||
get: function () { | ||
return (obj.path.replace(/#/g, "\u200b#") + | ||
obj.query.replace(/#/g, "\u200b#") + | ||
obj.fragment); | ||
}, | ||
set: function (value) { | ||
get: () => obj.path.replace(/#/g, "\u200b#") + | ||
obj.query.replace(/#/g, "\u200b#") + | ||
obj.fragment, | ||
set: value => { | ||
var splittedRequest = (0, identifier_1.parseResourceWithoutFragment)(value.request); | ||
@@ -195,3 +193,3 @@ obj.path = splittedRequest.path; | ||
}; | ||
const innerCallback = (context.callback = function (err, ...args) { | ||
const innerCallback = (context.callback = (err, ...args) => { | ||
if (isDone) { | ||
@@ -227,3 +225,3 @@ if (reportedError) | ||
typeof result.then === "function") { | ||
result.then(function (r) { | ||
result.then((r) => { | ||
callback(null, [r]); | ||
@@ -238,2 +236,7 @@ }, callback); | ||
catch (e) { | ||
// use string for napi getter | ||
let err = e; | ||
if ("hideStack" in err && err.hideStack) { | ||
err.hideStack = "true"; | ||
} | ||
if (isError) | ||
@@ -395,3 +398,3 @@ throw e; | ||
enumerable: true, | ||
get: function () { | ||
get: () => { | ||
if (loaderContext.resourcePath === undefined) | ||
@@ -403,3 +406,3 @@ return undefined; | ||
}, | ||
set: function (value) { | ||
set: value => { | ||
const splittedResource = value && parsePathQueryFragment(value); | ||
@@ -419,14 +422,10 @@ loaderContext.resourcePath = splittedResource | ||
enumerable: true, | ||
get: function () { | ||
return loaderContext.loaders | ||
.map(function (o) { | ||
return o.request; | ||
}) | ||
.concat(loaderContext.resource || "") | ||
.join("!"); | ||
} | ||
get: () => loaderContext.loaders | ||
.map(o => o.request) | ||
.concat(loaderContext.resource || "") | ||
.join("!") | ||
}); | ||
Object.defineProperty(loaderContext, "remainingRequest", { | ||
enumerable: true, | ||
get: function () { | ||
get: () => { | ||
if (loaderContext.loaderIndex >= loaderContext.loaders.length - 1 && | ||
@@ -437,5 +436,3 @@ !loaderContext.resource) | ||
.slice(loaderContext.loaderIndex + 1) | ||
.map(function (o) { | ||
return o.request; | ||
}) | ||
.map(o => o.request) | ||
.concat(loaderContext.resource || "") | ||
@@ -447,26 +444,18 @@ .join("!"); | ||
enumerable: true, | ||
get: function () { | ||
return loaderContext.loaders | ||
.slice(loaderContext.loaderIndex) | ||
.map(function (o) { | ||
return o.request; | ||
}) | ||
.concat(loaderContext.resource || "") | ||
.join("!"); | ||
} | ||
get: () => loaderContext.loaders | ||
.slice(loaderContext.loaderIndex) | ||
.map(o => o.request) | ||
.concat(loaderContext.resource || "") | ||
.join("!") | ||
}); | ||
Object.defineProperty(loaderContext, "previousRequest", { | ||
enumerable: true, | ||
get: function () { | ||
return loaderContext.loaders | ||
.slice(0, loaderContext.loaderIndex) | ||
.map(function (o) { | ||
return o.request; | ||
}) | ||
.join("!"); | ||
} | ||
get: () => loaderContext.loaders | ||
.slice(0, loaderContext.loaderIndex) | ||
.map(o => o.request) | ||
.join("!") | ||
}); | ||
Object.defineProperty(loaderContext, "query", { | ||
enumerable: true, | ||
get: function () { | ||
get: () => { | ||
const entry = loaderContext.loaders[loaderContext.loaderIndex]; | ||
@@ -506,3 +495,3 @@ return entry.options && typeof entry.options === "object" | ||
}; | ||
const resolver = compiler.resolverFactory.get("normal"); | ||
const resolver = compiler._lastCompilation.resolverFactory.get("normal"); | ||
loaderContext.resolve = function resolve(context, request, callback) { | ||
@@ -541,3 +530,3 @@ resolver.resolve({}, context, request, getResolveContext(), callback); | ||
error.message = `${error.message} (from: ${(0, util_2.stringifyLoaderObject)(loaderContext.loaders[loaderContext.loaderIndex])})`; | ||
hasStack && Error.captureStackTrace(error); | ||
!hasStack && Error.captureStackTrace(error); | ||
error = (0, util_2.concatErrorMsgAndStack)(error); | ||
@@ -612,3 +601,3 @@ error.moduleIdentifier = this._module.identifier(); | ||
loaderContext._module = Module_1.Module.__from_binding(context._module, compiler._lastCompilation); | ||
loaderContext.getOptions = function () { | ||
loaderContext.getOptions = () => { | ||
const loader = getCurrentLoader(loaderContext); | ||
@@ -684,5 +673,3 @@ let options = loader?.options; | ||
])) || []; | ||
const hasArg = args.some(function (value) { | ||
return value !== undefined; | ||
}); | ||
const hasArg = args.some(value => value !== undefined); | ||
if (hasArg) { | ||
@@ -689,0 +676,0 @@ const [content, sourceMap, additionalData] = args; |
@@ -23,3 +23,3 @@ "use strict"; | ||
var modulePromise = eval("import(" + JSON.stringify(loaderUrl.toString()) + ")"); | ||
modulePromise.then(function (module) { | ||
modulePromise.then(module => { | ||
handleResult(loader, module, callback); | ||
@@ -26,0 +26,0 @@ }, callback); |
@@ -1,4 +0,4 @@ | ||
import { JsCodegenerationResult, JsCodegenerationResults, JsCreateData, JsFactoryMeta, JsModule } from "@rspack/binding"; | ||
import { Source } from "../compiled/webpack-sources"; | ||
import { Compilation } from "./Compilation"; | ||
import type { JsCodegenerationResult, JsCodegenerationResults, JsCreateData, JsFactoryMeta, JsModule } from "@rspack/binding"; | ||
import type { Source } from "../compiled/webpack-sources"; | ||
import type { Compilation } from "./Compilation"; | ||
export type ResourceData = { | ||
@@ -44,2 +44,3 @@ resource: string; | ||
rawRequest?: Readonly<string>; | ||
type: string; | ||
factoryMeta?: Readonly<JsFactoryMeta>; | ||
@@ -46,0 +47,0 @@ /** |
@@ -25,2 +25,3 @@ "use strict"; | ||
__classPrivateFieldSet(this, _Module_inner, module, "f"); | ||
this.type = module.type; | ||
this.context = module.context; | ||
@@ -27,0 +28,0 @@ this.resource = module.resource; |
@@ -11,7 +11,7 @@ /** | ||
import * as liteTapable from "@rspack/lite-tapable"; | ||
import { Compiler, RspackOptions } from "."; | ||
import type { Compiler, RspackOptions } from "."; | ||
import MultiStats from "./MultiStats"; | ||
import MultiWatching from "./MultiWatching"; | ||
import { WatchOptions } from "./config"; | ||
import { WatchFileSystem } from "./util/fs"; | ||
import type { WatchOptions } from "./config"; | ||
import type { WatchFileSystem } from "./util/fs"; | ||
export interface MultiCompilerOptions { | ||
@@ -18,0 +18,0 @@ /** |
@@ -10,4 +10,4 @@ /** | ||
*/ | ||
import { Stats } from "./Stats"; | ||
import { StatsCompilation } from "./stats/statsFactoryUtils"; | ||
import type { Stats } from "./Stats"; | ||
import type { StatsCompilation } from "./stats/statsFactoryUtils"; | ||
export default class MultiStats { | ||
@@ -14,0 +14,0 @@ #private; |
@@ -10,4 +10,4 @@ /** | ||
*/ | ||
import { MultiCompiler } from "./MultiCompiler"; | ||
import { Watching } from "./Watching"; | ||
import type { MultiCompiler } from "./MultiCompiler"; | ||
import type { Watching } from "./Watching"; | ||
declare class MultiWatching { | ||
@@ -14,0 +14,0 @@ watchings: Watching[]; |
@@ -10,3 +10,3 @@ /** | ||
*/ | ||
import { Compiler } from "../Compiler"; | ||
import type { Compiler } from "../Compiler"; | ||
export type NodeTemplatePluginOptions = { | ||
@@ -13,0 +13,0 @@ asyncChunkLoading?: boolean; |
@@ -11,3 +11,3 @@ /** | ||
import Watchpack from "../../compiled/watchpack"; | ||
import { FileSystemInfoEntry, WatchFileSystem, Watcher } from "../util/fs"; | ||
import type { FileSystemInfoEntry, WatchFileSystem, Watcher } from "../util/fs"; | ||
export default class NodeWatchFileSystem implements WatchFileSystem { | ||
@@ -14,0 +14,0 @@ inputFileSystem: any; |
/// <reference types="node" /> | ||
import * as liteTapable from "@rspack/lite-tapable"; | ||
import { Compilation } from "./Compilation"; | ||
import { LoaderContext } from "./config"; | ||
import type { LoaderContext } from "./config"; | ||
export declare class NormalModule { | ||
@@ -6,0 +6,0 @@ static getCompilationHooks(compilation: Compilation): { |
import type * as binding from "@rspack/binding"; | ||
import * as liteTapable from "@rspack/lite-tapable"; | ||
import { ResolveData, ResourceDataWithData } from "./Module"; | ||
import type { ResolveData, ResourceDataWithData } from "./Module"; | ||
export type NormalModuleCreateData = binding.JsNormalModuleFactoryCreateModuleArgs & { | ||
@@ -5,0 +5,0 @@ settings: {}; |
@@ -1,48 +0,10 @@ | ||
export = ResolverFactory; | ||
declare class ResolverFactory { | ||
hooks: Readonly<{ | ||
/** @type {HookMap<SyncWaterfallHook<[ResolveOptionsWithDependencyType]>>} */ | ||
resolveOptions: HookMap<SyncWaterfallHook<[ResolveOptionsWithDependencyType]>>; | ||
/** @type {HookMap<SyncHook<[Resolver, ResolveOptions, ResolveOptionsWithDependencyType]>>} */ | ||
resolver: HookMap<SyncHook<[Resolver, ResolveOptions, ResolveOptionsWithDependencyType]>>; | ||
}>; | ||
/** @type {Map<string, ResolverCache>} */ | ||
cache: Map<string, ResolverCache>; | ||
/** | ||
* @param {string} type type of resolver | ||
* @param {ResolveOptionsWithDependencyType=} resolveOptions options | ||
* @returns {ResolverWithOptions} the resolver | ||
*/ | ||
get(type: string, resolveOptions?: ResolveOptionsWithDependencyType | undefined): ResolverWithOptions; | ||
/** | ||
* @param {string} type type of resolver | ||
* @param {ResolveOptionsWithDependencyType} resolveOptionsWithDepType options | ||
* @returns {ResolverWithOptions} the resolver | ||
*/ | ||
_create(type: string, resolveOptionsWithDepType: ResolveOptionsWithDependencyType): ResolverWithOptions; | ||
import * as binding from "@rspack/binding"; | ||
import { Resolver } from "./Resolver"; | ||
type ResolveOptionsWithDependencyType = binding.RawResolveOptionsWithDependencyType; | ||
export declare class ResolverFactory { | ||
#private; | ||
static __to_binding(resolver_factory: ResolverFactory): binding.JsResolverFactory; | ||
constructor(); | ||
get(type: string, resolveOptions?: ResolveOptionsWithDependencyType): Resolver; | ||
} | ||
declare namespace ResolverFactory { | ||
export { ResolveOptions, Resolver, WebpackResolveOptions, ResolvePluginInstance, ResolveOptionsWithDependencyType, WithOptions, ResolverWithOptions, ResolverCache }; | ||
} | ||
import { HookMap } from "@rspack/lite-tapable"; | ||
import { SyncWaterfallHook } from "@rspack/lite-tapable"; | ||
type ResolveOptionsWithDependencyType = WebpackResolveOptions & { | ||
dependencyType?: string; | ||
resolveToContext?: boolean; | ||
}; | ||
import { SyncHook } from "@rspack/lite-tapable"; | ||
type Resolver = import("../compiled/enhanced-resolve").Resolver; | ||
type ResolveOptions = import("../compiled/enhanced-resolve").ResolveOptions; | ||
type ResolverCache = { | ||
direct: WeakMap<Object, ResolverWithOptions>; | ||
stringified: Map<string, ResolverWithOptions>; | ||
}; | ||
type ResolverWithOptions = Resolver & WithOptions; | ||
type WebpackResolveOptions = any; | ||
type ResolvePluginInstance = any; | ||
type WithOptions = { | ||
/** | ||
* create a resolver with additional/different options | ||
*/ | ||
withOptions: (arg0: Partial<ResolveOptionsWithDependencyType>) => ResolverWithOptions; | ||
}; | ||
export {}; |
@@ -1,126 +0,55 @@ | ||
/** | ||
* The following code is modified based on | ||
* https://github.com/webpack/webpack/blob/4b4ca3b/lib/ResolverFactory.js | ||
* | ||
* MIT Licensed | ||
* Author Tobias Koppers @sokra | ||
* Copyright (c) JS Foundation and other contributors | ||
* https://github.com/webpack/webpack/blob/main/LICENSE | ||
*/ | ||
"use strict"; | ||
const Factory = require("../compiled/enhanced-resolve").ResolverFactory; | ||
const { HookMap, SyncHook, SyncWaterfallHook } = require("@rspack/lite-tapable"); | ||
const { cachedCleverMerge, removeOperations, resolveByProperty } = require("./util/cleverMerge"); | ||
/** @typedef {import("../compiled/enhanced-resolve").ResolveOptions} ResolveOptions */ | ||
/** @typedef {import("../compiled/enhanced-resolve").Resolver} Resolver */ | ||
// /** @typedef {import("../declarations/WebpackOptions").ResolveOptions} WebpackResolveOptions */ | ||