@rspack/core 0.7.6-canary-1a0d77d-20240627143904 → 0.7.6-canary-fd6c40d-20240918093542
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/Compiler.js
CHANGED
|
@@ -77,7 +77,6 @@ const Logger_1 = require("./logging/Logger");
|
|
|
77
77
|
const util_1 = require("./util");
|
|
78
78
|
const assertNotNil_1 = require("./util/assertNotNil");
|
|
79
79
|
const bindingVersionCheck_1 = require("./util/bindingVersionCheck");
|
|
80
|
-
const createHash_1 = require("./util/createHash");
|
|
81
80
|
const identifier_1 = require("./util/identifier");
|
|
82
81
|
class Compiler {
|
|
83
82
|
constructor(context, options) {
|
|
@@ -729,13 +728,6 @@ _Compiler_instance = new WeakMap(), _Compiler_initial = new WeakMap(), _Compiler
|
|
|
729
728
|
})
|
|
730
729
|
: false;
|
|
731
730
|
return result;
|
|
732
|
-
}),
|
|
733
|
-
registerJavascriptModulesChunkHashTaps: __classPrivateFieldGet(this, _Compiler_instances, "m", _Compiler_createHookRegisterTaps).call(this, binding.RegisterJsTapKind.JavascriptModulesChunkHash, () => builtin_plugin_1.JavascriptModulesPlugin.getCompilationHooks(__classPrivateFieldGet(this, _Compiler_compilation, "f"))
|
|
734
|
-
.chunkHash, queried => (chunk) => {
|
|
735
|
-
const hash = (0, createHash_1.createHash)(this.options.output.hashFunction);
|
|
736
|
-
queried.call(Chunk_1.Chunk.__from_binding(chunk, __classPrivateFieldGet(this, _Compiler_compilation, "f")), hash);
|
|
737
|
-
const digestResult = hash.digest(this.options.output.hashDigest);
|
|
738
|
-
return Buffer.from(digestResult);
|
|
739
731
|
})
|
|
740
732
|
}, "f");
|
|
741
733
|
__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");
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { BuiltinPluginName } from "@rspack/binding";
|
|
2
|
+
export declare const JavascriptModulesPlugin: {
|
|
3
|
+
new (): {
|
|
4
|
+
name: BuiltinPluginName;
|
|
5
|
+
_options: void;
|
|
6
|
+
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;
|
|
7
|
+
raw(): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("../Compiler").Compiler): void;
|
|
9
|
+
};
|
|
9
10
|
};
|
|
10
|
-
export declare class JavascriptModulesPlugin extends RspackBuiltinPlugin {
|
|
11
|
-
name: BuiltinPluginName;
|
|
12
|
-
affectedHooks: "compilation";
|
|
13
|
-
constructor();
|
|
14
|
-
raw(): BuiltinPlugin;
|
|
15
|
-
static getCompilationHooks(compilation: Compilation): CompilationHooks;
|
|
16
|
-
}
|
|
@@ -1,55 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.JavascriptModulesPlugin = void 0;
|
|
27
4
|
const binding_1 = require("@rspack/binding");
|
|
28
|
-
const Compilation_1 = require("../Compilation");
|
|
29
|
-
const liteTapable = __importStar(require("../lite-tapable"));
|
|
30
5
|
const base_1 = require("./base");
|
|
31
|
-
|
|
32
|
-
class JavascriptModulesPlugin extends base_1.RspackBuiltinPlugin {
|
|
33
|
-
constructor() {
|
|
34
|
-
super();
|
|
35
|
-
this.name = binding_1.BuiltinPluginName.JavascriptModulesPlugin;
|
|
36
|
-
this.affectedHooks = "compilation";
|
|
37
|
-
}
|
|
38
|
-
raw() {
|
|
39
|
-
return (0, base_1.createBuiltinPlugin)(this.name, undefined);
|
|
40
|
-
}
|
|
41
|
-
static getCompilationHooks(compilation) {
|
|
42
|
-
if (!(compilation instanceof Compilation_1.Compilation)) {
|
|
43
|
-
throw new TypeError("The 'compilation' argument must be an instance of Compilation");
|
|
44
|
-
}
|
|
45
|
-
let hooks = compilationHooksMap.get(compilation);
|
|
46
|
-
if (hooks === undefined) {
|
|
47
|
-
hooks = {
|
|
48
|
-
chunkHash: new liteTapable.SyncHook(["chunk", "hash"])
|
|
49
|
-
};
|
|
50
|
-
compilationHooksMap.set(compilation, hooks);
|
|
51
|
-
}
|
|
52
|
-
return hooks;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
exports.JavascriptModulesPlugin = JavascriptModulesPlugin;
|
|
6
|
+
exports.JavascriptModulesPlugin = (0, base_1.create)(binding_1.BuiltinPluginName.JavascriptModulesPlugin, () => { }, "compilation");
|
package/dist/exports.d.ts
CHANGED
|
@@ -87,10 +87,9 @@ interface Wasm {
|
|
|
87
87
|
EnableWasmLoadingPlugin: typeof EnableWasmLoadingPlugin;
|
|
88
88
|
}
|
|
89
89
|
export declare const wasm: Wasm;
|
|
90
|
-
import { EnableChunkLoadingPlugin
|
|
90
|
+
import { EnableChunkLoadingPlugin } from "./builtin-plugin";
|
|
91
91
|
interface JavaScript {
|
|
92
92
|
EnableChunkLoadingPlugin: typeof EnableChunkLoadingPlugin;
|
|
93
|
-
JavascriptModulesPlugin: typeof JavascriptModulesPlugin;
|
|
94
93
|
}
|
|
95
94
|
export declare const javascript: JavaScript;
|
|
96
95
|
import { WebWorkerTemplatePlugin } from "./builtin-plugin";
|
package/dist/exports.js
CHANGED
|
@@ -117,10 +117,7 @@ exports.library = { EnableLibraryPlugin: builtin_plugin_13.EnableLibraryPlugin }
|
|
|
117
117
|
const builtin_plugin_14 = require("./builtin-plugin");
|
|
118
118
|
exports.wasm = { EnableWasmLoadingPlugin: builtin_plugin_14.EnableWasmLoadingPlugin };
|
|
119
119
|
const builtin_plugin_15 = require("./builtin-plugin");
|
|
120
|
-
exports.javascript = {
|
|
121
|
-
EnableChunkLoadingPlugin: builtin_plugin_15.EnableChunkLoadingPlugin,
|
|
122
|
-
JavascriptModulesPlugin: builtin_plugin_15.JavascriptModulesPlugin
|
|
123
|
-
};
|
|
120
|
+
exports.javascript = { EnableChunkLoadingPlugin: builtin_plugin_15.EnableChunkLoadingPlugin };
|
|
124
121
|
const builtin_plugin_16 = require("./builtin-plugin");
|
|
125
122
|
exports.webworker = { WebWorkerTemplatePlugin: builtin_plugin_16.WebWorkerTemplatePlugin };
|
|
126
123
|
const builtin_plugin_17 = require("./builtin-plugin");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "0.7.6-canary-
|
|
3
|
+
"version": "0.7.6-canary-fd6c40d-20240918093542",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "The fast Rust-based web bundler with webpack-compatible API",
|
|
@@ -74,15 +74,15 @@
|
|
|
74
74
|
"watchpack": "^2.4.0",
|
|
75
75
|
"zod": "^3.21.4",
|
|
76
76
|
"zod-validation-error": "1.3.1",
|
|
77
|
-
"@rspack/
|
|
78
|
-
"@rspack/
|
|
77
|
+
"@rspack/plugin-minify": "^0.7.6-canary-fd6c40d-20240918093542",
|
|
78
|
+
"@rspack/core": "0.7.6-canary-fd6c40d-20240918093542"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@module-federation/runtime-tools": "0.1.6",
|
|
82
82
|
"caniuse-lite": "^1.0.30001616",
|
|
83
83
|
"tapable": "2.2.1",
|
|
84
84
|
"webpack-sources": "3.2.3",
|
|
85
|
-
"@rspack/binding": "0.7.6-canary-
|
|
85
|
+
"@rspack/binding": "0.7.6-canary-fd6c40d-20240918093542"
|
|
86
86
|
},
|
|
87
87
|
"peerDependencies": {
|
|
88
88
|
"@swc/helpers": ">=0.5.1"
|