@rspack/core 0.6.5 → 0.7.0-beta.0
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/Chunk.d.ts +1 -1
- package/dist/Chunk.js +1 -1
- package/dist/ChunkGroup.d.ts +2 -0
- package/dist/ChunkGroup.js +4 -0
- package/dist/Compilation.d.ts +46 -65
- package/dist/Compilation.js +128 -222
- package/dist/Compiler.d.ts +75 -44
- package/dist/Compiler.js +325 -278
- package/dist/ContextModuleFactory.d.ts +7 -3
- package/dist/ContextModuleFactory.js +2 -2
- package/dist/Entrypoint.d.ts +1 -1
- package/dist/Entrypoint.js +1 -1
- package/dist/ExecuteModulePlugin.js +1 -1
- package/dist/Module.d.ts +11 -0
- package/dist/Module.js +2 -2
- package/dist/MultiCompiler.d.ts +10 -25
- package/dist/MultiCompiler.js +3 -3
- package/dist/MultiStats.d.ts +1 -1
- package/dist/NormalModuleFactory.d.ts +1 -1
- package/dist/Stats.d.ts +2 -2
- package/dist/Watching.d.ts +0 -9
- package/dist/Watching.js +12 -2
- package/dist/builtin-loader/swc/index.d.ts +6 -6
- package/dist/builtin-loader/swc/index.js +3 -3
- package/dist/builtin-loader/swc/types.d.ts +2 -2
- package/dist/builtin-plugin/APIPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AssetModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/BannerPlugin.d.ts +2 -2
- package/dist/builtin-plugin/BannerPlugin.js +1 -1
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CopyRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/CssModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DataUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DefinePlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DynamicEntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/DynamicEntryPlugin.js +1 -1
- package/dist/builtin-plugin/ElectronTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableLibraryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.d.ts +1 -1
- package/dist/builtin-plugin/EntryPlugin.js +1 -1
- package/dist/builtin-plugin/EvalDevToolModulePlugin.d.ts +1 -1
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ExternalsPlugin.d.ts +3 -3
- package/dist/builtin-plugin/FileUriPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.d.ts +1 -1
- package/dist/builtin-plugin/HtmlRspackPlugin.d.ts +2 -2
- package/dist/builtin-plugin/HtmlRspackPlugin.js +2 -2
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/IgnorePlugin.d.ts +1 -1
- package/dist/builtin-plugin/InferAsyncModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JavascriptModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.d.ts +1 -1
- package/dist/builtin-plugin/JsLoaderRspackPlugin.js +1 -1
- package/dist/builtin-plugin/JsonModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/LimitChunkCountPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MangleExportsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ModuleConcatenationPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedChunkIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NamedModuleIdsPlugin.d.ts +1 -1
- package/dist/builtin-plugin/NodeTargetPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProgressPlugin.d.ts +1 -1
- package/dist/builtin-plugin/ProvidePlugin.d.ts +1 -1
- package/dist/builtin-plugin/RealContentHashPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimeChunkPlugin.d.ts +1 -1
- package/dist/builtin-plugin/RuntimePlugin.d.ts +1 -1
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SizeLimitsPlugin.d.ts +15 -0
- package/dist/builtin-plugin/SizeLimitsPlugin.js +9 -0
- package/dist/builtin-plugin/SourceMapDevToolPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SplitChunksPlugin.d.ts +2 -2
- package/dist/builtin-plugin/SplitChunksPlugin.js +4 -4
- package/dist/builtin-plugin/SwcCssMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.d.ts +1 -1
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.d.ts +1 -1
- package/dist/builtin-plugin/WorkerPlugin.d.ts +2 -2
- package/dist/builtin-plugin/base.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/index.d.ts +5 -4
- package/dist/builtin-plugin/css-extract/loader.d.ts +1 -1
- package/dist/builtin-plugin/css-extract/loader.js +2 -2
- package/dist/builtin-plugin/index.d.ts +44 -43
- package/dist/builtin-plugin/index.js +44 -43
- package/dist/config/adapter.d.ts +2 -2
- package/dist/config/adapter.js +6 -5
- package/dist/config/adapterRuleUse.d.ts +2 -1
- package/dist/config/adapterRuleUse.js +2 -2
- package/dist/config/defaults.js +21 -4
- package/dist/config/index.d.ts +2 -2
- package/dist/config/index.js +2 -2
- package/dist/config/normalization.d.ts +2 -2
- package/dist/config/normalization.js +1 -0
- package/dist/config/zod.d.ts +317 -189
- package/dist/config/zod.js +23 -29
- package/dist/container/ContainerPlugin.d.ts +1 -1
- package/dist/container/ContainerReferencePlugin.d.ts +1 -1
- package/dist/container/ContainerReferencePlugin.js +1 -1
- package/dist/container/ModuleFederationPlugin.js +1 -1
- package/dist/container/ModuleFederationPluginV1.d.ts +1 -1
- package/dist/container/ModuleFederationPluginV1.js +1 -1
- package/dist/container/ModuleFederationRuntimePlugin.d.ts +1 -1
- package/dist/exports.d.ts +36 -30
- package/dist/exports.js +36 -28
- package/dist/fileSystem.d.ts +12 -8
- package/dist/fileSystem.js +25 -48
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lite-tapable/index.d.ts +6 -0
- package/dist/lite-tapable/index.js +107 -1
- package/dist/loader-runner/index.js +13 -13
- package/dist/logging/Logger.d.ts +1 -1
- package/dist/logging/createConsoleLogger.js +0 -14
- package/dist/node/NodeEnvironmentPlugin.d.ts +1 -1
- package/dist/node/NodeEnvironmentPlugin.js +1 -1
- package/dist/node/nodeConsole.js +0 -4
- package/dist/rspack.d.ts +4 -13
- package/dist/rspack.js +8 -8
- package/dist/rspackOptionsApply.d.ts +1 -10
- package/dist/rspackOptionsApply.js +17 -5
- package/dist/sharing/ConsumeSharedPlugin.d.ts +1 -1
- package/dist/sharing/ConsumeSharedPlugin.js +1 -1
- package/dist/stats/DefaultStatsFactoryPlugin.js +2 -2
- package/dist/stats/StatsFactory.d.ts +2 -2
- package/dist/stats/StatsFactory.js +0 -9
- package/dist/stats/StatsPrinter.d.ts +1 -1
- package/dist/stats/statsFactoryUtils.d.ts +1 -1
- package/dist/util/comparators.d.ts +1 -1
- package/dist/util/fs.d.ts +64 -0
- package/dist/util/fs.js +122 -0
- package/dist/util/index.d.ts +2 -1
- package/dist/util/index.js +16 -11
- package/dist/util/source.d.ts +18 -0
- package/dist/util/source.js +66 -0
- package/package.json +6 -5
- package/dist/util/createSource.d.ts +0 -5
- package/dist/util/createSource.js +0 -65
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { RawCssExtractPluginOption } from "@rspack/binding";
|
|
2
2
|
import { Compiler } from "../..";
|
|
3
3
|
export * from "./loader";
|
|
4
|
-
export
|
|
4
|
+
export type { CssExtractRspackLoaderOptions } from "./loader";
|
|
5
|
+
export interface CssExtractRspackPluginOptions {
|
|
5
6
|
filename?: string;
|
|
6
7
|
chunkFilename?: string;
|
|
7
8
|
ignoreOrder?: boolean;
|
|
@@ -14,9 +15,9 @@ export interface PluginOptions {
|
|
|
14
15
|
export declare class CssExtractRspackPlugin {
|
|
15
16
|
static pluginName: string;
|
|
16
17
|
static loader: string;
|
|
17
|
-
options:
|
|
18
|
-
constructor(options?:
|
|
18
|
+
options: CssExtractRspackPluginOptions;
|
|
19
|
+
constructor(options?: CssExtractRspackPluginOptions);
|
|
19
20
|
apply(compiler: Compiler): void;
|
|
20
|
-
normalizeOptions(options:
|
|
21
|
+
normalizeOptions(options: CssExtractRspackPluginOptions): RawCssExtractPluginOption;
|
|
21
22
|
}
|
|
22
23
|
export default CssExtractRspackPlugin;
|
|
@@ -4,7 +4,7 @@ export declare const AUTO_PUBLIC_PATH = "__mini_css_extract_plugin_public_path_a
|
|
|
4
4
|
export declare const ABSOLUTE_PUBLIC_PATH = "webpack:///mini-css-extract-plugin/";
|
|
5
5
|
export declare const BASE_URI = "webpack://";
|
|
6
6
|
export declare const SINGLE_DOT_PATH_SEGMENT = "__mini_css_extract_plugin_single_dot_path_segment__";
|
|
7
|
-
export interface
|
|
7
|
+
export interface CssExtractRspackLoaderOptions {
|
|
8
8
|
publicPath?: string | ((resourcePath: string, context: string) => string);
|
|
9
9
|
emit?: boolean;
|
|
10
10
|
esModule?: boolean;
|
|
@@ -4,9 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.pitch = exports.SINGLE_DOT_PATH_SEGMENT = exports.BASE_URI = exports.ABSOLUTE_PUBLIC_PATH = exports.AUTO_PUBLIC_PATH = exports.MODULE_TYPE = void 0;
|
|
7
|
-
const loader_options_json_1 = __importDefault(require("./loader-options.json"));
|
|
8
|
-
const index_1 = require("./index");
|
|
9
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
+
const index_1 = require("./index");
|
|
9
|
+
const loader_options_json_1 = __importDefault(require("./loader-options.json"));
|
|
10
10
|
const utils_1 = require("./utils");
|
|
11
11
|
exports.MODULE_TYPE = "css/mini-extract";
|
|
12
12
|
exports.AUTO_PUBLIC_PATH = "__mini_css_extract_plugin_public_path_auto__";
|
|
@@ -1,62 +1,63 @@
|
|
|
1
|
+
export * from "./APIPlugin";
|
|
2
|
+
export * from "./ArrayPushCallbackChunkFormatPlugin";
|
|
3
|
+
export * from "./AssetModulesPlugin";
|
|
4
|
+
export * from "./AsyncWebAssemblyModulesPlugin";
|
|
5
|
+
export * from "./BannerPlugin";
|
|
1
6
|
export { RspackBuiltinPlugin } from "./base";
|
|
7
|
+
export * from "./BundlerInfoRspackPlugin";
|
|
8
|
+
export * from "./ChunkPrefetchPreloadPlugin";
|
|
9
|
+
export * from "./CommonJsChunkFormatPlugin";
|
|
10
|
+
export * from "./CopyRspackPlugin";
|
|
11
|
+
export * from "./css-extract";
|
|
12
|
+
export * from "./CssModulesPlugin";
|
|
13
|
+
export * from "./DataUriPlugin";
|
|
2
14
|
export * from "./DefinePlugin";
|
|
3
|
-
export * from "./
|
|
4
|
-
export * from "./
|
|
5
|
-
export * from "./IgnorePlugin";
|
|
6
|
-
export * from "./ProgressPlugin";
|
|
7
|
-
export * from "./EntryPlugin";
|
|
15
|
+
export * from "./DeterministicChunkIdsPlugin";
|
|
16
|
+
export * from "./DeterministicModuleIdsPlugin";
|
|
8
17
|
export * from "./DynamicEntryPlugin";
|
|
9
|
-
export * from "./ExternalsPlugin";
|
|
10
|
-
export * from "./NodeTargetPlugin";
|
|
11
18
|
export * from "./ElectronTargetPlugin";
|
|
12
|
-
export * from "./HttpExternalsRspackPlugin";
|
|
13
19
|
export * from "./EnableChunkLoadingPlugin";
|
|
14
20
|
export * from "./EnableLibraryPlugin";
|
|
15
21
|
export * from "./EnableWasmLoadingPlugin";
|
|
16
|
-
export * from "./
|
|
17
|
-
export * from "./
|
|
18
|
-
export * from "./
|
|
19
|
-
export * from "./
|
|
22
|
+
export * from "./EnsureChunkConditionsPlugin";
|
|
23
|
+
export * from "./EntryPlugin";
|
|
24
|
+
export * from "./EvalDevToolModulePlugin";
|
|
25
|
+
export * from "./EvalSourceMapDevToolPlugin";
|
|
26
|
+
export * from "./ExternalsPlugin";
|
|
27
|
+
export * from "./FileUriPlugin";
|
|
28
|
+
export * from "./FlagDependencyExportsPlugin";
|
|
29
|
+
export * from "./FlagDependencyUsagePlugin";
|
|
20
30
|
export * from "./HotModuleReplacementPlugin";
|
|
21
|
-
export * from "./
|
|
22
|
-
export * from "./
|
|
31
|
+
export * from "./HtmlRspackPlugin";
|
|
32
|
+
export * from "./HttpExternalsRspackPlugin";
|
|
33
|
+
export * from "./IgnorePlugin";
|
|
34
|
+
export * from "./InferAsyncModulesPlugin";
|
|
35
|
+
export * from "./JavascriptModulesPlugin";
|
|
36
|
+
export * from "./JsLoaderRspackPlugin";
|
|
37
|
+
export * from "./JsonModulesPlugin";
|
|
23
38
|
export * from "./LimitChunkCountPlugin";
|
|
39
|
+
export * from "./MangleExportsPlugin";
|
|
24
40
|
export * from "./MergeDuplicateChunksPlugin";
|
|
25
|
-
export * from "./
|
|
26
|
-
export * from "./
|
|
27
|
-
export * from "./DeterministicModuleIdsPlugin";
|
|
41
|
+
export * from "./ModuleChunkFormatPlugin";
|
|
42
|
+
export * from "./ModuleConcatenationPlugin";
|
|
28
43
|
export * from "./NamedChunkIdsPlugin";
|
|
29
|
-
export * from "./
|
|
44
|
+
export * from "./NamedModuleIdsPlugin";
|
|
45
|
+
export * from "./NodeTargetPlugin";
|
|
46
|
+
export * from "./ProgressPlugin";
|
|
47
|
+
export * from "./ProvidePlugin";
|
|
30
48
|
export * from "./RealContentHashPlugin";
|
|
31
49
|
export * from "./RemoveEmptyChunksPlugin";
|
|
32
|
-
export * from "./
|
|
33
|
-
export * from "./WarnCaseSensitiveModulesPlugin";
|
|
34
|
-
export * from "./DataUriPlugin";
|
|
35
|
-
export * from "./FileUriPlugin";
|
|
50
|
+
export * from "./RuntimeChunkPlugin";
|
|
36
51
|
export * from "./RuntimePlugin";
|
|
37
|
-
export * from "./JsonModulesPlugin";
|
|
38
|
-
export * from "./InferAsyncModulesPlugin";
|
|
39
|
-
export * from "./JavascriptModulesPlugin";
|
|
40
|
-
export * from "./AsyncWebAssemblyModulesPlugin";
|
|
41
|
-
export * from "./AssetModulesPlugin";
|
|
42
|
-
export * from "./SourceMapDevToolPlugin";
|
|
43
|
-
export * from "./EvalSourceMapDevToolPlugin";
|
|
44
|
-
export * from "./EvalDevToolModulePlugin";
|
|
45
52
|
export * from "./SideEffectsFlagPlugin";
|
|
46
|
-
export * from "./
|
|
47
|
-
export * from "./
|
|
48
|
-
export * from "./
|
|
49
|
-
export * from "./BundlerInfoRspackPlugin";
|
|
50
|
-
export * from "./ModuleConcatenationPlugin";
|
|
51
|
-
export * from "./CssModulesPlugin";
|
|
52
|
-
export * from "./APIPlugin";
|
|
53
|
-
export * from "./RuntimeChunkPlugin";
|
|
54
|
-
export * from "./HtmlRspackPlugin";
|
|
55
|
-
export * from "./CopyRspackPlugin";
|
|
56
|
-
export * from "./SwcJsMinimizerPlugin";
|
|
53
|
+
export * from "./SizeLimitsPlugin";
|
|
54
|
+
export * from "./SourceMapDevToolPlugin";
|
|
55
|
+
export * from "./SplitChunksPlugin";
|
|
57
56
|
export * from "./SwcCssMinimizerPlugin";
|
|
58
|
-
export * from "./
|
|
59
|
-
export * from "./
|
|
57
|
+
export * from "./SwcJsMinimizerPlugin";
|
|
58
|
+
export * from "./WarnCaseSensitiveModulesPlugin";
|
|
59
|
+
export * from "./WebWorkerTemplatePlugin";
|
|
60
|
+
export * from "./WorkerPlugin";
|
|
60
61
|
import { RawBuiltins } from "@rspack/binding";
|
|
61
62
|
import { RspackOptionsNormalized } from "..";
|
|
62
63
|
export interface Builtins {
|
|
@@ -15,66 +15,67 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.deprecated_resolveBuiltins = exports.RspackBuiltinPlugin = void 0;
|
|
18
|
+
__exportStar(require("./APIPlugin"), exports);
|
|
19
|
+
__exportStar(require("./ArrayPushCallbackChunkFormatPlugin"), exports);
|
|
20
|
+
__exportStar(require("./AssetModulesPlugin"), exports);
|
|
21
|
+
__exportStar(require("./AsyncWebAssemblyModulesPlugin"), exports);
|
|
22
|
+
__exportStar(require("./BannerPlugin"), exports);
|
|
18
23
|
var base_1 = require("./base");
|
|
19
24
|
Object.defineProperty(exports, "RspackBuiltinPlugin", { enumerable: true, get: function () { return base_1.RspackBuiltinPlugin; } });
|
|
25
|
+
__exportStar(require("./BundlerInfoRspackPlugin"), exports);
|
|
26
|
+
__exportStar(require("./ChunkPrefetchPreloadPlugin"), exports);
|
|
27
|
+
__exportStar(require("./CommonJsChunkFormatPlugin"), exports);
|
|
28
|
+
__exportStar(require("./CopyRspackPlugin"), exports);
|
|
29
|
+
__exportStar(require("./css-extract"), exports);
|
|
30
|
+
__exportStar(require("./CssModulesPlugin"), exports);
|
|
31
|
+
__exportStar(require("./DataUriPlugin"), exports);
|
|
20
32
|
__exportStar(require("./DefinePlugin"), exports);
|
|
21
|
-
__exportStar(require("./
|
|
22
|
-
__exportStar(require("./
|
|
23
|
-
__exportStar(require("./IgnorePlugin"), exports);
|
|
24
|
-
__exportStar(require("./ProgressPlugin"), exports);
|
|
25
|
-
__exportStar(require("./EntryPlugin"), exports);
|
|
33
|
+
__exportStar(require("./DeterministicChunkIdsPlugin"), exports);
|
|
34
|
+
__exportStar(require("./DeterministicModuleIdsPlugin"), exports);
|
|
26
35
|
__exportStar(require("./DynamicEntryPlugin"), exports);
|
|
27
|
-
__exportStar(require("./ExternalsPlugin"), exports);
|
|
28
|
-
__exportStar(require("./NodeTargetPlugin"), exports);
|
|
29
36
|
__exportStar(require("./ElectronTargetPlugin"), exports);
|
|
30
|
-
__exportStar(require("./HttpExternalsRspackPlugin"), exports);
|
|
31
37
|
__exportStar(require("./EnableChunkLoadingPlugin"), exports);
|
|
32
38
|
__exportStar(require("./EnableLibraryPlugin"), exports);
|
|
33
39
|
__exportStar(require("./EnableWasmLoadingPlugin"), exports);
|
|
34
|
-
__exportStar(require("./
|
|
35
|
-
__exportStar(require("./
|
|
36
|
-
__exportStar(require("./
|
|
37
|
-
__exportStar(require("./
|
|
40
|
+
__exportStar(require("./EnsureChunkConditionsPlugin"), exports);
|
|
41
|
+
__exportStar(require("./EntryPlugin"), exports);
|
|
42
|
+
__exportStar(require("./EvalDevToolModulePlugin"), exports);
|
|
43
|
+
__exportStar(require("./EvalSourceMapDevToolPlugin"), exports);
|
|
44
|
+
__exportStar(require("./ExternalsPlugin"), exports);
|
|
45
|
+
__exportStar(require("./FileUriPlugin"), exports);
|
|
46
|
+
__exportStar(require("./FlagDependencyExportsPlugin"), exports);
|
|
47
|
+
__exportStar(require("./FlagDependencyUsagePlugin"), exports);
|
|
38
48
|
__exportStar(require("./HotModuleReplacementPlugin"), exports);
|
|
39
|
-
__exportStar(require("./
|
|
40
|
-
__exportStar(require("./
|
|
49
|
+
__exportStar(require("./HtmlRspackPlugin"), exports);
|
|
50
|
+
__exportStar(require("./HttpExternalsRspackPlugin"), exports);
|
|
51
|
+
__exportStar(require("./IgnorePlugin"), exports);
|
|
52
|
+
__exportStar(require("./InferAsyncModulesPlugin"), exports);
|
|
53
|
+
__exportStar(require("./JavascriptModulesPlugin"), exports);
|
|
54
|
+
__exportStar(require("./JsLoaderRspackPlugin"), exports);
|
|
55
|
+
__exportStar(require("./JsonModulesPlugin"), exports);
|
|
41
56
|
__exportStar(require("./LimitChunkCountPlugin"), exports);
|
|
57
|
+
__exportStar(require("./MangleExportsPlugin"), exports);
|
|
42
58
|
__exportStar(require("./MergeDuplicateChunksPlugin"), exports);
|
|
43
|
-
__exportStar(require("./
|
|
44
|
-
__exportStar(require("./
|
|
45
|
-
__exportStar(require("./DeterministicModuleIdsPlugin"), exports);
|
|
59
|
+
__exportStar(require("./ModuleChunkFormatPlugin"), exports);
|
|
60
|
+
__exportStar(require("./ModuleConcatenationPlugin"), exports);
|
|
46
61
|
__exportStar(require("./NamedChunkIdsPlugin"), exports);
|
|
47
|
-
__exportStar(require("./
|
|
62
|
+
__exportStar(require("./NamedModuleIdsPlugin"), exports);
|
|
63
|
+
__exportStar(require("./NodeTargetPlugin"), exports);
|
|
64
|
+
__exportStar(require("./ProgressPlugin"), exports);
|
|
65
|
+
__exportStar(require("./ProvidePlugin"), exports);
|
|
48
66
|
__exportStar(require("./RealContentHashPlugin"), exports);
|
|
49
67
|
__exportStar(require("./RemoveEmptyChunksPlugin"), exports);
|
|
50
|
-
__exportStar(require("./
|
|
51
|
-
__exportStar(require("./WarnCaseSensitiveModulesPlugin"), exports);
|
|
52
|
-
__exportStar(require("./DataUriPlugin"), exports);
|
|
53
|
-
__exportStar(require("./FileUriPlugin"), exports);
|
|
68
|
+
__exportStar(require("./RuntimeChunkPlugin"), exports);
|
|
54
69
|
__exportStar(require("./RuntimePlugin"), exports);
|
|
55
|
-
__exportStar(require("./JsonModulesPlugin"), exports);
|
|
56
|
-
__exportStar(require("./InferAsyncModulesPlugin"), exports);
|
|
57
|
-
__exportStar(require("./JavascriptModulesPlugin"), exports);
|
|
58
|
-
__exportStar(require("./AsyncWebAssemblyModulesPlugin"), exports);
|
|
59
|
-
__exportStar(require("./AssetModulesPlugin"), exports);
|
|
60
|
-
__exportStar(require("./SourceMapDevToolPlugin"), exports);
|
|
61
|
-
__exportStar(require("./EvalSourceMapDevToolPlugin"), exports);
|
|
62
|
-
__exportStar(require("./EvalDevToolModulePlugin"), exports);
|
|
63
70
|
__exportStar(require("./SideEffectsFlagPlugin"), exports);
|
|
64
|
-
__exportStar(require("./
|
|
65
|
-
__exportStar(require("./
|
|
66
|
-
__exportStar(require("./
|
|
67
|
-
__exportStar(require("./BundlerInfoRspackPlugin"), exports);
|
|
68
|
-
__exportStar(require("./ModuleConcatenationPlugin"), exports);
|
|
69
|
-
__exportStar(require("./CssModulesPlugin"), exports);
|
|
70
|
-
__exportStar(require("./APIPlugin"), exports);
|
|
71
|
-
__exportStar(require("./RuntimeChunkPlugin"), exports);
|
|
72
|
-
__exportStar(require("./HtmlRspackPlugin"), exports);
|
|
73
|
-
__exportStar(require("./CopyRspackPlugin"), exports);
|
|
74
|
-
__exportStar(require("./SwcJsMinimizerPlugin"), exports);
|
|
71
|
+
__exportStar(require("./SizeLimitsPlugin"), exports);
|
|
72
|
+
__exportStar(require("./SourceMapDevToolPlugin"), exports);
|
|
73
|
+
__exportStar(require("./SplitChunksPlugin"), exports);
|
|
75
74
|
__exportStar(require("./SwcCssMinimizerPlugin"), exports);
|
|
76
|
-
__exportStar(require("./
|
|
77
|
-
__exportStar(require("./
|
|
75
|
+
__exportStar(require("./SwcJsMinimizerPlugin"), exports);
|
|
76
|
+
__exportStar(require("./WarnCaseSensitiveModulesPlugin"), exports);
|
|
77
|
+
__exportStar(require("./WebWorkerTemplatePlugin"), exports);
|
|
78
|
+
__exportStar(require("./WorkerPlugin"), exports);
|
|
78
79
|
function resolveTreeShaking(treeShaking, production) {
|
|
79
80
|
return treeShaking !== undefined
|
|
80
81
|
? treeShaking.toString()
|
package/dist/config/adapter.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { RawLibraryOptions, RawOptions } from "@rspack/binding";
|
|
2
2
|
import { Compiler } from "../Compiler";
|
|
3
3
|
import { LoaderContext, LoaderDefinition, LoaderDefinitionFunction } from "./adapterRuleUse";
|
|
4
|
-
import { LibraryOptions, ChunkLoading } from "./zod";
|
|
5
4
|
import { RspackOptionsNormalized } from "./normalization";
|
|
5
|
+
import { ChunkLoading, LibraryOptions } from "./zod";
|
|
6
6
|
export type { LoaderContext, LoaderDefinition, LoaderDefinitionFunction };
|
|
7
7
|
export declare const getRawOptions: (options: RspackOptionsNormalized, compiler: Compiler) => RawOptions;
|
|
8
8
|
export declare function getRawLibrary(library: LibraryOptions): RawLibraryOptions;
|
package/dist/config/adapter.js
CHANGED
|
@@ -566,14 +566,16 @@ function getRawAssetGeneratorDataUrl(dataUrl) {
|
|
|
566
566
|
function getRawCssGeneratorOptions(options) {
|
|
567
567
|
return {
|
|
568
568
|
exportsConvention: options.exportsConvention,
|
|
569
|
-
exportsOnly: options.exportsOnly
|
|
569
|
+
exportsOnly: options.exportsOnly,
|
|
570
|
+
esModule: options.esModule
|
|
570
571
|
};
|
|
571
572
|
}
|
|
572
573
|
function getRawCssAutoOrModuleGeneratorOptions(options) {
|
|
573
574
|
return {
|
|
574
575
|
localIdentName: options.localIdentName,
|
|
575
576
|
exportsConvention: options.exportsConvention,
|
|
576
|
-
exportsOnly: options.exportsOnly
|
|
577
|
+
exportsOnly: options.exportsOnly,
|
|
578
|
+
esModule: options.esModule
|
|
577
579
|
};
|
|
578
580
|
}
|
|
579
581
|
function getRawOptimization(optimization) {
|
|
@@ -615,10 +617,9 @@ function getRawSnapshotOptions(snapshot) {
|
|
|
615
617
|
};
|
|
616
618
|
}
|
|
617
619
|
function getRawExperiments(experiments) {
|
|
618
|
-
const {
|
|
619
|
-
(0, assert_1.default)(!(0, util_1.isNil)(
|
|
620
|
+
const { topLevelAwait, rspackFuture } = experiments;
|
|
621
|
+
(0, assert_1.default)(!(0, util_1.isNil)(topLevelAwait) && !(0, util_1.isNil)(rspackFuture));
|
|
620
622
|
return {
|
|
621
|
-
newSplitChunks,
|
|
622
623
|
topLevelAwait,
|
|
623
624
|
rspackFuture: getRawRspackFutureOptions(rspackFuture)
|
|
624
625
|
};
|
|
@@ -4,6 +4,7 @@ import { ResolveRequest } from "enhanced-resolve";
|
|
|
4
4
|
import { Compiler } from "../Compiler";
|
|
5
5
|
import { Logger } from "../logging/Logger";
|
|
6
6
|
import Hash = require("../util/hash");
|
|
7
|
+
import { Compilation } from "../Compilation";
|
|
7
8
|
import { Mode, Resolve, RuleSetUseItem } from "./zod";
|
|
8
9
|
export interface ComposeJsUseOptions {
|
|
9
10
|
devtool: RawOptions["devtool"];
|
|
@@ -108,7 +109,7 @@ export interface LoaderContext<OptionsType = {}> {
|
|
|
108
109
|
query: string | OptionsType;
|
|
109
110
|
data: unknown;
|
|
110
111
|
_compiler: Compiler;
|
|
111
|
-
_compilation:
|
|
112
|
+
_compilation: Compilation;
|
|
112
113
|
/**
|
|
113
114
|
* Internal field for interoperability.
|
|
114
115
|
* Do not use this in anywhere else.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isUseSimpleSourceMap = exports.isUseSourceMap = exports.createRawModuleRuleUses = void 0;
|
|
4
|
+
const builtin_loader_1 = require("../builtin-loader");
|
|
4
5
|
const loader_runner_1 = require("../loader-runner");
|
|
5
6
|
const util_1 = require("../util");
|
|
6
|
-
const builtin_loader_1 = require("../builtin-loader");
|
|
7
7
|
const BUILTIN_LOADER_PREFIX = "builtin:";
|
|
8
8
|
function createRawModuleRuleUses(uses, path, options) {
|
|
9
9
|
const normalizeRuleSetUseItem = (item) => typeof item === "string" ? { loader: item } : item;
|
|
@@ -75,7 +75,7 @@ function resolveStringifyLoaders(use, path, compiler) {
|
|
|
75
75
|
if (use.options && typeof use.options === "object") {
|
|
76
76
|
if (!ident)
|
|
77
77
|
ident = "[[missing ident]]";
|
|
78
|
-
compiler.
|
|
78
|
+
compiler.__internal__ruleSet.references.set(ident, use.options);
|
|
79
79
|
}
|
|
80
80
|
return obj.path + obj.query + obj.fragment;
|
|
81
81
|
}
|
package/dist/config/defaults.js
CHANGED
|
@@ -20,10 +20,10 @@ const util_1 = require("../util");
|
|
|
20
20
|
const cleverMerge_1 = require("../util/cleverMerge");
|
|
21
21
|
const target_1 = require("./target");
|
|
22
22
|
const Template = require("../Template");
|
|
23
|
-
const assertNotNil_1 = require("../util/assertNotNil");
|
|
24
|
-
const ModuleTypeConstants_1 = require("../ModuleTypeConstants");
|
|
25
|
-
const SwcJsMinimizerPlugin_1 = require("../builtin-plugin/SwcJsMinimizerPlugin");
|
|
26
23
|
const SwcCssMinimizerPlugin_1 = require("../builtin-plugin/SwcCssMinimizerPlugin");
|
|
24
|
+
const SwcJsMinimizerPlugin_1 = require("../builtin-plugin/SwcJsMinimizerPlugin");
|
|
25
|
+
const ModuleTypeConstants_1 = require("../ModuleTypeConstants");
|
|
26
|
+
const assertNotNil_1 = require("../util/assertNotNil");
|
|
27
27
|
const applyRspackOptionsDefaults = (options) => {
|
|
28
28
|
var _a;
|
|
29
29
|
F(options, "context", () => process.cwd());
|
|
@@ -83,6 +83,14 @@ const applyRspackOptionsDefaults = (options) => {
|
|
|
83
83
|
: "var";
|
|
84
84
|
});
|
|
85
85
|
applyNodeDefaults(options.node, { targetProperties });
|
|
86
|
+
F(options, "performance", () => production &&
|
|
87
|
+
targetProperties &&
|
|
88
|
+
(targetProperties.browser || targetProperties.browser === null)
|
|
89
|
+
? {}
|
|
90
|
+
: false);
|
|
91
|
+
applyPerformanceDefaults(options.performance, {
|
|
92
|
+
production
|
|
93
|
+
});
|
|
86
94
|
applyOptimizationDefaults(options.optimization, {
|
|
87
95
|
production,
|
|
88
96
|
development,
|
|
@@ -113,7 +121,6 @@ const applyInfrastructureLoggingDefaults = (infrastructureLogging) => {
|
|
|
113
121
|
const applyExperimentsDefaults = (experiments, { cache }) => {
|
|
114
122
|
D(experiments, "lazyCompilation", false);
|
|
115
123
|
D(experiments, "asyncWebAssembly", false);
|
|
116
|
-
D(experiments, "newSplitChunks", true);
|
|
117
124
|
D(experiments, "css", true); // we not align with webpack about the default value for better DX
|
|
118
125
|
D(experiments, "topLevelAwait", true);
|
|
119
126
|
D(experiments, "rspackFuture", {});
|
|
@@ -190,16 +197,19 @@ const applyModuleDefaults = (module, { asyncWebAssembly, css, targetProperties }
|
|
|
190
197
|
(0, assertNotNil_1.assertNotNill)(module.generator.css);
|
|
191
198
|
D(module.generator["css"], "exportsOnly", !targetProperties || !targetProperties.document);
|
|
192
199
|
D(module.generator["css"], "exportsConvention", "as-is");
|
|
200
|
+
D(module.generator["css"], "esModule", true);
|
|
193
201
|
F(module.generator, "css/auto", () => ({}));
|
|
194
202
|
(0, assertNotNil_1.assertNotNill)(module.generator["css/auto"]);
|
|
195
203
|
D(module.generator["css/auto"], "exportsOnly", !targetProperties || !targetProperties.document);
|
|
196
204
|
D(module.generator["css/auto"], "exportsConvention", "as-is");
|
|
197
205
|
D(module.generator["css/auto"], "localIdentName", "[uniqueName]-[id]-[local]");
|
|
206
|
+
D(module.generator["css/auto"], "esModule", true);
|
|
198
207
|
F(module.generator, "css/module", () => ({}));
|
|
199
208
|
(0, assertNotNil_1.assertNotNill)(module.generator["css/module"]);
|
|
200
209
|
D(module.generator["css/module"], "exportsOnly", !targetProperties || !targetProperties.document);
|
|
201
210
|
D(module.generator["css/module"], "exportsConvention", "as-is");
|
|
202
211
|
D(module.generator["css/module"], "localIdentName", "[uniqueName]-[id]-[local]");
|
|
212
|
+
D(module.generator["css/module"], "esModule", true);
|
|
203
213
|
}
|
|
204
214
|
A(module, "defaultRules", () => {
|
|
205
215
|
const esm = {
|
|
@@ -615,6 +625,13 @@ const applyNodeDefaults = (node, { targetProperties }) => {
|
|
|
615
625
|
return "warn-mock";
|
|
616
626
|
});
|
|
617
627
|
};
|
|
628
|
+
const applyPerformanceDefaults = (performance, { production }) => {
|
|
629
|
+
if (performance === false)
|
|
630
|
+
return;
|
|
631
|
+
D(performance, "maxAssetSize", 250000);
|
|
632
|
+
D(performance, "maxEntrypointSize", 250000);
|
|
633
|
+
F(performance, "hints", () => (production ? "warning" : false));
|
|
634
|
+
};
|
|
618
635
|
const applyOptimizationDefaults = (optimization, { production, development, css }) => {
|
|
619
636
|
D(optimization, "removeAvailableModules", true);
|
|
620
637
|
D(optimization, "removeEmptyChunks", true);
|
package/dist/config/index.d.ts
CHANGED
package/dist/config/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./adapter"), exports);
|
|
18
|
+
__exportStar(require("./defaults"), exports);
|
|
17
19
|
__exportStar(require("./normalization"), exports);
|
|
18
20
|
__exportStar(require("./zod"), exports);
|
|
19
|
-
__exportStar(require("./defaults"), exports);
|
|
20
|
-
__exportStar(require("./adapter"), exports);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* https://github.com/webpack/webpack/blob/main/LICENSE
|
|
9
9
|
*/
|
|
10
10
|
import type { Compilation } from "../Compilation";
|
|
11
|
-
import type {
|
|
11
|
+
import type { AssetModuleFilename, Bail, Builtins, CacheOptions, ChunkFilename, ChunkLoading, ChunkLoadingGlobal, Clean, Context, CrossOriginLoading, CssChunkFilename, CssFilename, Dependencies, DevServer, DevTool, DevtoolFallbackModuleFilenameTemplate, DevtoolModuleFilenameTemplate, DevtoolNamespace, EnabledLibraryTypes, EnabledWasmLoadingTypes, EntryFilename, EntryRuntime, Externals, ExternalsPresets, ExternalsType, Filename, GeneratorOptionsByModuleType, GlobalObject, HashDigest, HashDigestLength, HashFunction, HashSalt, HotUpdateChunkFilename, HotUpdateGlobal, HotUpdateMainFilename, Iife, ImportFunctionName, InfrastructureLogging, LibraryOptions, Mode, Name, Node, NoParseOption, Optimization, OutputModule, ParserOptionsByModuleType, Path, Performance, Plugins, Profile, PublicPath, Resolve, RspackFutureOptions, RspackOptions, RuleSetRules, ScriptType, SnapshotOptions, SourceMapFilename, StatsValue, StrictModuleErrorHandling, Target, TrustedTypes, UniqueName, WasmLoading, Watch, WatchOptions, WebassemblyModuleFilename, WorkerPublicPath } from "./zod";
|
|
12
12
|
export declare const getNormalizedRspackOptions: (config: RspackOptions) => RspackOptionsNormalized;
|
|
13
13
|
export type EntryDynamicNormalized = () => Promise<EntryStaticNormalized>;
|
|
14
14
|
export type EntryNormalized = EntryDynamicNormalized | EntryStaticNormalized;
|
|
@@ -81,7 +81,6 @@ export interface ExperimentsNormalized {
|
|
|
81
81
|
lazyCompilation?: boolean;
|
|
82
82
|
asyncWebAssembly?: boolean;
|
|
83
83
|
outputModule?: boolean;
|
|
84
|
-
newSplitChunks?: boolean;
|
|
85
84
|
topLevelAwait?: boolean;
|
|
86
85
|
css?: boolean;
|
|
87
86
|
futureDefaults?: boolean;
|
|
@@ -120,6 +119,7 @@ export interface RspackOptionsNormalized {
|
|
|
120
119
|
watchOptions: WatchOptions;
|
|
121
120
|
devServer?: DevServer;
|
|
122
121
|
ignoreWarnings?: IgnoreWarningsNormalized;
|
|
122
|
+
performance?: Performance;
|
|
123
123
|
profile?: Profile;
|
|
124
124
|
bail?: Bail;
|
|
125
125
|
builtins: Builtins;
|