@rspack/core 1.4.8 → 1.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/BuildInfo.d.ts +1 -1
- package/dist/Chunk.d.ts +1 -0
- package/dist/ChunkGraph.d.ts +1 -1
- package/dist/Compilation.d.ts +1 -1
- package/dist/Compiler.d.ts +1 -1
- package/dist/Module.d.ts +1 -1
- package/dist/NativeWatchFileSystem.d.ts +1 -1
- package/dist/NormalModuleFactory.d.ts +1 -1
- package/dist/Resolver.d.ts +8 -3
- package/dist/ResolverFactory.d.ts +1 -1
- package/dist/RspackError.d.ts +1 -1
- package/dist/builtin-plugin/CssChunkingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -0
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/config/adapterRuleUse.d.ts +1 -1
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +5 -2
- package/dist/container/index.d.ts +4 -0
- package/dist/cssExtractLoader.js +2 -2
- package/dist/index.js +3711 -3704
- package/dist/stats/statsFactoryUtils.d.ts +1 -1
- package/dist/taps/compilation.d.ts +1 -1
- package/dist/taps/types.d.ts +1 -1
- package/package.json +4 -4
package/dist/BuildInfo.d.ts
CHANGED
package/dist/Chunk.d.ts
CHANGED
package/dist/ChunkGraph.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { RuntimeSpec } from "./util/runtime";
|
2
2
|
declare module "@rspack/binding" {
|
3
|
-
interface
|
3
|
+
interface ChunkGraph {
|
4
4
|
getModuleChunksIterable(module: Module): Iterable<Chunk>;
|
5
5
|
getOrderedChunkModulesIterable(chunk: Chunk, compareFn: (a: Module, b: Module) => number): Iterable<Module>;
|
6
6
|
getModuleHash(module: Module, runtime: RuntimeSpec): string | null;
|
package/dist/Compilation.d.ts
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
9
9
|
*/
|
10
10
|
import type { AssetInfo, ChunkGroup, Dependency, ExternalObject, JsCompilation, JsRuntimeModule } from "@rspack/binding";
|
11
|
-
import
|
11
|
+
import binding from "@rspack/binding";
|
12
12
|
export type { AssetInfo } from "@rspack/binding";
|
13
13
|
import * as liteTapable from "@rspack/lite-tapable";
|
14
14
|
import type { Source } from "../compiled/webpack-sources";
|
package/dist/Compiler.d.ts
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
* Copyright (c) JS Foundation and other contributors
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
9
9
|
*/
|
10
|
-
import type
|
10
|
+
import type binding from "@rspack/binding";
|
11
11
|
import * as liteTapable from "@rspack/lite-tapable";
|
12
12
|
import type Watchpack from "../compiled/watchpack";
|
13
13
|
import type { Source } from "../compiled/webpack-sources";
|
package/dist/Module.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import binding from "@rspack/binding";
|
2
2
|
import type Watchpack from "../compiled/watchpack";
|
3
3
|
import type { FileSystemInfoEntry, Watcher, WatchFileSystem } from "./util/fs";
|
4
4
|
export default class NativeWatchFileSystem implements WatchFileSystem {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type
|
1
|
+
import type binding from "@rspack/binding";
|
2
2
|
import * as liteTapable from "@rspack/lite-tapable";
|
3
3
|
import type { ResolveData, ResourceDataWithData } from "./Module";
|
4
4
|
import type { ResolverFactory } from "./ResolverFactory";
|
package/dist/Resolver.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import type
|
1
|
+
import type binding from "@rspack/binding";
|
2
2
|
import { type Resolve } from "./config";
|
3
3
|
import type { ResolveCallback } from "./config/adapterRuleUse";
|
4
4
|
type ResolveContext = {};
|
@@ -7,10 +7,15 @@ type ResolveOptionsWithDependencyType = Resolve & {
|
|
7
7
|
resolveToContext?: boolean;
|
8
8
|
};
|
9
9
|
export type ResourceData = binding.JsResourceData;
|
10
|
-
export
|
10
|
+
export interface ResolveRequest {
|
11
|
+
path: string;
|
12
|
+
query: string;
|
13
|
+
fragment: string;
|
14
|
+
descriptionFileData?: string;
|
15
|
+
descriptionFilePath?: string;
|
16
|
+
}
|
11
17
|
export declare class Resolver {
|
12
18
|
#private;
|
13
|
-
binding: binding.JsResolver;
|
14
19
|
constructor(binding: binding.JsResolver);
|
15
20
|
resolveSync(context: object, path: string, request: string): string | false;
|
16
21
|
resolve(context: object, path: string, request: string, resolveContext: ResolveContext, callback: ResolveCallback): void;
|
package/dist/RspackError.d.ts
CHANGED
@@ -13,6 +13,7 @@ export type SwcJsMinimizerRspackPluginOptions = {
|
|
13
13
|
extractComments?: ExtractCommentsOptions | undefined;
|
14
14
|
minimizerOptions?: {
|
15
15
|
minify?: boolean;
|
16
|
+
ecma?: TerserEcmaVersion;
|
16
17
|
compress?: TerserCompressOptions | boolean;
|
17
18
|
mangle?: TerserMangleOptions | boolean;
|
18
19
|
format?: JsFormatOptions & ToSnakeCaseProperties<JsFormatOptions>;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import binding from "@rspack/binding";
|
2
2
|
import type { Compiler, RspackPluginInstance } from "..";
|
3
3
|
type AffectedHooks = keyof Compiler["hooks"];
|
4
4
|
export declare function canInherentFromParent(affectedHooks?: AffectedHooks): boolean;
|
@@ -320,7 +320,7 @@ export interface LoaderContext<OptionsType = {}> {
|
|
320
320
|
*
|
321
321
|
* @internal
|
322
322
|
*/
|
323
|
-
|
323
|
+
__internal__setParseMeta: (key: string, value: string) => void;
|
324
324
|
}
|
325
325
|
export type LoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = (this: LoaderContext<OptionsType> & ContextAdditions, content: string, sourceMap?: string | SourceMap, additionalData?: AdditionalData) => string | void | Buffer | Promise<string | Buffer>;
|
326
326
|
export type PitchLoaderDefinitionFunction<OptionsType = {}, ContextAdditions = {}> = (this: LoaderContext<OptionsType> & ContextAdditions, remainingRequest: string, previousRequest: string, data: object) => string | void | Buffer | Promise<string | Buffer>;
|
@@ -1,7 +1,10 @@
|
|
1
|
+
export interface ModuleFederationRuntimeOptions {
|
2
|
+
entryRuntime?: string;
|
3
|
+
}
|
1
4
|
export declare const ModuleFederationRuntimePlugin: {
|
2
|
-
new (): {
|
5
|
+
new (options?: ModuleFederationRuntimeOptions | undefined): {
|
3
6
|
name: string;
|
4
|
-
_args: [];
|
7
|
+
_args: [options?: ModuleFederationRuntimeOptions | undefined];
|
5
8
|
affectedHooks: "done" | "compilation" | "afterDone" | "thisCompilation" | "invalid" | "compile" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "emit" | "assetEmitted" | "afterEmit" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "make" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | "additionalPass" | undefined;
|
6
9
|
raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
|
7
10
|
apply(compiler: import("..").Compiler): void;
|
package/dist/cssExtractLoader.js
CHANGED
@@ -79,7 +79,7 @@ let pitch = function(request, _, data) {
|
|
79
79
|
e.stack = void 0, this.emitWarning(e);
|
80
80
|
return;
|
81
81
|
}
|
82
|
-
let options = this.getOptions(), emit = void 0 === options.emit || options.emit, callback = this.async(), filepath = this.resourcePath
|
82
|
+
let options = this.getOptions(), emit = void 0 === options.emit || options.emit, callback = this.async(), filepath = this.resourcePath;
|
83
83
|
this.addDependency(filepath);
|
84
84
|
let { publicPath } = this._compilation.outputOptions;
|
85
85
|
"string" == typeof options.publicPath ? publicPath = options.publicPath : "function" == typeof options.publicPath && (publicPath = options.publicPath(this.resourcePath, this.rootContext)), "auto" === publicPath && (publicPath = AUTO_PUBLIC_PATH), publicPathForExtract = "string" == typeof publicPath ? /^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(publicPath) ? publicPath : `${ABSOLUTE_PUBLIC_PATH}${publicPath.replace(/\./g, SINGLE_DOT_PATH_SEGMENT)}` : publicPath, this.importModule(`${this.resourcePath}.webpack[javascript/auto]!=!!!${request}`, {
|
@@ -138,7 +138,7 @@ let pitch = function(request, _, data) {
|
|
138
138
|
loaderContext: this,
|
139
139
|
options,
|
140
140
|
locals: locals
|
141
|
-
}) : result, dependencies.length > 0 && (
|
141
|
+
}) : result, dependencies.length > 0 && this.__internal__setParseMeta(PLUGIN_NAME, JSON.stringify(dependencies)), callback(null, resultSource, void 0, data);
|
142
142
|
})(exports1);
|
143
143
|
});
|
144
144
|
}, css_extract_loader = function(content) {
|