These properties are added by the NormalModule
CompilationCompilerNormalModuleInputFileSystemstringnumberHashFunctionstring"development" | "none" | "production"stringbooleanObjectnormalModuleLoaderContext.utils.absolutify(context, request): string
normalModuleLoaderContext.utils.contextify(context, request): string
normalModuleLoaderContext.utils.createHash(algorithm?): Hash
numberbooleannormalModuleLoaderContext.addBuildDependency(dep): void
stringnormalModuleLoaderContext.emitError(error): void
Emits an error for this module. The error will be displayed to the user and typically causes the compilation to fail.
normalModuleLoaderContext.emitFile(name, content, sourceMap?, assetInfo?): void
Emits a new file (asset) to the compilation output directory. This allows loaders to generate additional files alongside the main module output.
normalModuleLoaderContext.emitWarning(warning): void
Emits a warning for this module. The warning will be displayed to the user during compilation.
normalModuleLoaderContext.getLogger(name?): WebpackLogger
stringWebpackLoggerGets a logger instance scoped to this loader and module. Useful for emitting debug or compilation information in a structured way.
normalModuleLoaderContext.getOptions(): OptionsType
OptionsTypeExtracts and parses the options of the current loader. Parses string options as JSON or a query string.
normalModuleLoaderContext.getOptions(schema): OptionsType
SchemaOptionsTypeExtracts and parses the options of the current loader. Parses string options as JSON or a query string, and optionally validates them against a provided schema.
normalModuleLoaderContext.getResolve(options?): { (context: string, request: string, callback: (err: ErrorWithDetail | null, res?: string | false, req?: ResolveRequest) => void): void; (context: string, request: string): Promise<string> }
ResolveOptionsWithDependencyTypeCreates a resolve function with specific options. The returned function can be used as a Promise-based resolver or a callback-based resolver.
normalModuleLoaderContext.resolve(context, request, callback): void
stringstring(err: ErrorWithDetail | null, res?: string | false, req?: ResolveRequest) => voidResolves a module request (e.g., a relative path or module name) to an absolute file path. It uses Webpack's internal resolver, taking into account configured aliases and extensions.