@rspack-canary/core 1.6.7-canary-3faa835a-20251204182618 → 1.6.7-canary-5041023c-20251205173645

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.
@@ -83,7 +83,7 @@ export interface ExecuteModuleArgument {
83
83
  };
84
84
  }
85
85
  export interface ExecuteModuleContext {
86
- __webpack_require__: (id: string) => any;
86
+ [key: string]: (id: string) => any;
87
87
  }
88
88
  export interface KnownNormalizedStatsOptions {
89
89
  context: string;
@@ -8,217 +8,232 @@
8
8
  * https://github.com/webpack/webpack/blob/main/LICENSE
9
9
  */
10
10
  import type { JsRuntimeGlobals } from "@rspack/binding";
11
- export declare function __from_binding_runtime_globals(runtimeRequirements: JsRuntimeGlobals): Set<string>;
12
- export declare function __to_binding_runtime_globals(runtimeRequirements: Set<string>): JsRuntimeGlobals;
13
- export declare const RuntimeGlobals: {
11
+ import type { RspackOptionsNormalized } from "./config";
12
+ export declare function __from_binding_runtime_globals(runtimeRequirements: JsRuntimeGlobals, compilerRuntimeGlobals: Record<string, string>): Set<string>;
13
+ export declare function __to_binding_runtime_globals(runtimeRequirements: Set<string>, compilerRuntimeGlobals: Record<string, string>): JsRuntimeGlobals;
14
+ declare enum RuntimeGlobals {
14
15
  /**
15
16
  * the internal require function
16
17
  */
17
- readonly require: "__webpack_require__";
18
+ require = 0,
18
19
  /**
19
20
  * access to properties of the internal require function/object
20
21
  */
21
- readonly requireScope: "__webpack_require__.*";
22
+ requireScope = 1,
22
23
  /**
23
24
  * the internal exports object
24
25
  */
25
- readonly exports: "__webpack_exports__";
26
+ exports = 2,
26
27
  /**
27
28
  * top-level this need to be the exports object
28
29
  */
29
- readonly thisAsExports: "top-level-this-exports";
30
+ thisAsExports = 3,
30
31
  /**
31
32
  * runtime need to return the exports of the last entry module
32
33
  */
33
- readonly returnExportsFromRuntime: "return-exports-from-runtime";
34
+ returnExportsFromRuntime = 4,
34
35
  /**
35
36
  * the internal module object
36
37
  */
37
- readonly module: "module";
38
+ module = 5,
38
39
  /**
39
40
  * the internal module object
40
41
  */
41
- readonly moduleId: "module.id";
42
+ moduleId = 6,
42
43
  /**
43
44
  * the internal module object
44
45
  */
45
- readonly moduleLoaded: "module.loaded";
46
+ moduleLoaded = 7,
46
47
  /**
47
48
  * the bundle public path
48
49
  */
49
- readonly publicPath: "__webpack_require__.p";
50
+ publicPath = 8,
50
51
  /**
51
52
  * the module id of the entry point
52
53
  */
53
- readonly entryModuleId: "__webpack_require__.s";
54
+ entryModuleId = 9,
54
55
  /**
55
56
  * the module cache
56
57
  */
57
- readonly moduleCache: "__webpack_require__.c";
58
+ moduleCache = 10,
58
59
  /**
59
60
  * the module functions
60
61
  */
61
- readonly moduleFactories: "__webpack_require__.m";
62
+ moduleFactories = 11,
62
63
  /**
63
64
  * the module functions, with only write access
64
65
  */
65
- readonly moduleFactoriesAddOnly: "__webpack_require__.m (add only)";
66
+ moduleFactoriesAddOnly = 12,
66
67
  /**
67
68
  * the chunk ensure function
68
69
  */
69
- readonly ensureChunk: "__webpack_require__.e";
70
+ ensureChunk = 13,
70
71
  /**
71
72
  * an object with handlers to ensure a chunk
72
73
  */
73
- readonly ensureChunkHandlers: "__webpack_require__.f";
74
+ ensureChunkHandlers = 14,
74
75
  /**
75
76
  * a runtime requirement if ensureChunkHandlers should include loading of chunk needed for entries
76
77
  */
77
- readonly ensureChunkIncludeEntries: "__webpack_require__.f (include entries)";
78
+ ensureChunkIncludeEntries = 15,
78
79
  /**
79
80
  * the chunk prefetch function
80
81
  */
81
- readonly prefetchChunk: "__webpack_require__.E";
82
+ prefetchChunk = 16,
82
83
  /**
83
84
  * an object with handlers to prefetch a chunk
84
85
  */
85
- readonly prefetchChunkHandlers: "__webpack_require__.F";
86
+ prefetchChunkHandlers = 17,
86
87
  /**
87
88
  * the chunk preload function
88
89
  */
89
- readonly preloadChunk: "__webpack_require__.G";
90
+ preloadChunk = 18,
90
91
  /**
91
92
  * an object with handlers to preload a chunk
92
93
  */
93
- readonly preloadChunkHandlers: "__webpack_require__.H";
94
+ preloadChunkHandlers = 19,
94
95
  /**
95
96
  * the exported property define getters function
96
97
  */
97
- readonly definePropertyGetters: "__webpack_require__.d";
98
+ definePropertyGetters = 20,
98
99
  /**
99
100
  * define compatibility on export
100
101
  */
101
- readonly makeNamespaceObject: "__webpack_require__.r";
102
+ makeNamespaceObject = 21,
102
103
  /**
103
104
  * create a fake namespace object
104
105
  */
105
- readonly createFakeNamespaceObject: "__webpack_require__.t";
106
+ createFakeNamespaceObject = 22,
106
107
  /**
107
108
  * compatibility get default export
108
109
  */
109
- readonly compatGetDefaultExport: "__webpack_require__.n";
110
+ compatGetDefaultExport = 23,
110
111
  /**
111
112
  * ES modules decorator
112
113
  */
113
- readonly harmonyModuleDecorator: "__webpack_require__.hmd";
114
+ harmonyModuleDecorator = 24,
114
115
  /**
115
116
  * node.js module decorator
116
117
  */
117
- readonly nodeModuleDecorator: "__webpack_require__.nmd";
118
+ nodeModuleDecorator = 25,
118
119
  /**
119
120
  * the webpack hash
120
121
  */
121
- readonly getFullHash: "__webpack_require__.h";
122
+ getFullHash = 26,
122
123
  /**
123
124
  * an object containing all installed WebAssembly.Instance export objects keyed by module id
124
125
  */
125
- readonly wasmInstances: "__webpack_require__.w";
126
+ wasmInstances = 27,
126
127
  /**
127
128
  * instantiate a wasm instance from module exports object, id, hash and importsObject
128
129
  */
129
- readonly instantiateWasm: "__webpack_require__.v";
130
+ instantiateWasm = 28,
130
131
  /**
131
132
  * the uncaught error handler for the webpack runtime
132
133
  */
133
- readonly uncaughtErrorHandler: "__webpack_require__.oe";
134
+ uncaughtErrorHandler = 29,
134
135
  /**
135
136
  * the script nonce
136
137
  */
137
- readonly scriptNonce: "__webpack_require__.nc";
138
+ scriptNonce = 30,
138
139
  /**
139
140
  * function to load a script tag.
140
141
  * Arguments: (url: string, done: (event) =\> void), key?: string | number, chunkId?: string | number) =\> void
141
142
  * done function is called when loading has finished or timeout occurred.
142
143
  * It will attach to existing script tags with data-webpack == uniqueName + ":" + key or src == url.
143
144
  */
144
- readonly loadScript: "__webpack_require__.l";
145
+ loadScript = 31,
145
146
  /**
146
147
  * function to promote a string to a TrustedScript using webpack's Trusted
147
148
  * Types policy
148
149
  * Arguments: (script: string) =\> TrustedScript
149
150
  */
150
- readonly createScript: "__webpack_require__.ts";
151
+ createScript = 32,
151
152
  /**
152
153
  * function to promote a string to a TrustedScriptURL using webpack's Trusted
153
154
  * Types policy
154
155
  * Arguments: (url: string) =\> TrustedScriptURL
155
156
  */
156
- readonly createScriptUrl: "__webpack_require__.tu";
157
+ createScriptUrl = 33,
157
158
  /**
158
159
  * function to return webpack's Trusted Types policy
159
160
  * Arguments: () =\> TrustedTypePolicy
160
161
  */
161
- readonly getTrustedTypesPolicy: "__webpack_require__.tt";
162
+ getTrustedTypesPolicy = 34,
162
163
  /**
163
164
  * a flag when a chunk has a fetch priority
164
165
  */
165
- readonly hasFetchPriority: "has fetch priority";
166
+ hasFetchPriority = 35,
166
167
  /**
167
168
  * the chunk name of the chunk with the runtime
168
169
  */
169
- readonly chunkName: "__webpack_require__.cn";
170
+ chunkName = 36,
170
171
  /**
171
172
  * the runtime id of the current runtime
172
173
  */
173
- readonly runtimeId: "__webpack_require__.j";
174
+ runtimeId = 37,
174
175
  /**
175
176
  * the filename of the script part of the chunk
176
177
  */
177
- readonly getChunkScriptFilename: "__webpack_require__.u";
178
+ getChunkScriptFilename = 38,
178
179
  /**
179
180
  * the filename of the css part of the chunk
180
181
  */
181
- readonly getChunkCssFilename: "__webpack_require__.k";
182
+ getChunkCssFilename = 39,
183
+ /**
184
+ * rspack version
185
+ * @internal
186
+ */
187
+ rspackVersion = 40,
182
188
  /**
183
189
  * a flag when a module/chunk/tree has css modules
184
190
  */
185
- readonly hasCssModules: "has css modules";
191
+ hasCssModules = 41,
192
+ /**
193
+ * rspack unique id
194
+ * @internal
195
+ */
196
+ rspackUniqueId = 42,
186
197
  /**
187
198
  * the filename of the script part of the hot update chunk
188
199
  */
189
- readonly getChunkUpdateScriptFilename: "__webpack_require__.hu";
200
+ getChunkUpdateScriptFilename = 43,
190
201
  /**
191
202
  * the filename of the css part of the hot update chunk
192
203
  */
193
- readonly getChunkUpdateCssFilename: "__webpack_require__.hk";
204
+ getChunkUpdateCssFilename = 44,
194
205
  /**
195
206
  * startup signal from runtime
196
207
  * This will be called when the runtime chunk has been loaded.
197
208
  */
198
- readonly startup: "__webpack_require__.x";
209
+ startup = 45,
199
210
  /**
200
211
  * @deprecated
201
212
  * creating a default startup function with the entry modules
202
213
  */
203
- readonly startupNoDefault: "__webpack_require__.x (no default handler)";
214
+ startupNoDefault = 46,
204
215
  /**
205
216
  * startup signal from runtime but only used to add logic after the startup
206
217
  */
207
- readonly startupOnlyAfter: "__webpack_require__.x (only after)";
218
+ startupOnlyAfter = 47,
208
219
  /**
209
220
  * startup signal from runtime but only used to add sync logic before the startup
210
221
  */
211
- readonly startupOnlyBefore: "__webpack_require__.x (only before)";
222
+ startupOnlyBefore = 48,
212
223
  /**
213
224
  * global callback functions for installing chunks
214
225
  */
215
- readonly chunkCallback: "webpackChunk";
226
+ chunkCallback = 49,
216
227
  /**
217
228
  * method to startup an entrypoint with needed chunks.
218
229
  * Signature: (moduleId: Id, chunkIds: Id[]) =\> any.
219
230
  * Returns the exports of the module or a Promise
220
231
  */
221
- readonly startupEntrypoint: "__webpack_require__.X";
232
+ startupEntrypoint = 50,
233
+ /**
234
+ * startup signal from runtime for chunk dependencies
235
+ */
236
+ startupChunkDependencies = 51,
222
237
  /**
223
238
  * register deferred code, which will run when certain
224
239
  * chunks are loaded.
@@ -227,87 +242,87 @@ export declare const RuntimeGlobals: {
227
242
  * When (priority & 1) it will wait for all other handlers with lower priority to
228
243
  * be executed before itself is executed
229
244
  */
230
- readonly onChunksLoaded: "__webpack_require__.O";
245
+ onChunksLoaded = 52,
231
246
  /**
232
247
  * method to install a chunk that was loaded somehow
233
248
  * Signature: (\{ id, ids, modules, runtime \}) =\> void
234
249
  */
235
- readonly externalInstallChunk: "__webpack_require__.C";
250
+ externalInstallChunk = 53,
236
251
  /**
237
252
  * interceptor for module executions
238
253
  */
239
- readonly interceptModuleExecution: "__webpack_require__.i";
254
+ interceptModuleExecution = 54,
240
255
  /**
241
256
  * the global object
242
257
  */
243
- readonly global: "__webpack_require__.g";
258
+ global = 55,
244
259
  /**
245
260
  * an object with all share scopes
246
261
  */
247
- readonly shareScopeMap: "__webpack_require__.S";
262
+ shareScopeMap = 56,
248
263
  /**
249
264
  * The sharing init sequence function (only runs once per share scope).
250
265
  * Has one argument, the name of the share scope.
251
266
  * Creates a share scope if not existing
252
267
  */
253
- readonly initializeSharing: "__webpack_require__.I";
268
+ initializeSharing = 57,
254
269
  /**
255
270
  * The current scope when getting a module from a remote
256
271
  */
257
- readonly currentRemoteGetScope: "__webpack_require__.R";
272
+ currentRemoteGetScope = 58,
258
273
  /**
259
274
  * the filename of the HMR manifest
260
275
  */
261
- readonly getUpdateManifestFilename: "__webpack_require__.hmrF";
276
+ getUpdateManifestFilename = 59,
262
277
  /**
263
278
  * function downloading the update manifest
264
279
  */
265
- readonly hmrDownloadManifest: "__webpack_require__.hmrM";
280
+ hmrDownloadManifest = 60,
266
281
  /**
267
282
  * array with handler functions to download chunk updates
268
283
  */
269
- readonly hmrDownloadUpdateHandlers: "__webpack_require__.hmrC";
284
+ hmrDownloadUpdateHandlers = 61,
270
285
  /**
271
286
  * object with all hmr module data for all modules
272
287
  */
273
- readonly hmrModuleData: "__webpack_require__.hmrD";
288
+ hmrModuleData = 62,
274
289
  /**
275
290
  * array with handler functions when a module should be invalidated
276
291
  */
277
- readonly hmrInvalidateModuleHandlers: "__webpack_require__.hmrI";
292
+ hmrInvalidateModuleHandlers = 63,
278
293
  /**
279
294
  * the prefix for storing state of runtime modules when hmr is enabled
280
295
  */
281
- readonly hmrRuntimeStatePrefix: "__webpack_require__.hmrS";
296
+ hmrRuntimeStatePrefix = 64,
282
297
  /**
283
298
  * the AMD define function
284
299
  */
285
- readonly amdDefine: "__webpack_require__.amdD";
300
+ amdDefine = 65,
286
301
  /**
287
302
  * the AMD options
288
303
  */
289
- readonly amdOptions: "__webpack_require__.amdO";
304
+ amdOptions = 66,
290
305
  /**
291
306
  * the System polyfill object
292
307
  */
293
- readonly system: "__webpack_require__.System";
308
+ system = 67,
294
309
  /**
295
310
  * the shorthand for Object.prototype.hasOwnProperty
296
311
  * using of it decreases the compiled bundle size
297
312
  */
298
- readonly hasOwnProperty: "__webpack_require__.o";
313
+ hasOwnProperty = 68,
299
314
  /**
300
315
  * the System.register context object
301
316
  */
302
- readonly systemContext: "__webpack_require__.y";
317
+ systemContext = 69,
303
318
  /**
304
319
  * the baseURI of current document
305
320
  */
306
- readonly baseURI: "__webpack_require__.b";
321
+ baseURI = 70,
307
322
  /**
308
323
  * a RelativeURL class when relative URLs are used
309
324
  */
310
- readonly relativeUrl: "__webpack_require__.U";
325
+ relativeUrl = 71,
311
326
  /**
312
327
  * Creates an async module. The body function must be a async function.
313
328
  * "module.exports" will be decorated with an AsyncModulePromise.
@@ -320,9 +335,22 @@ export declare const RuntimeGlobals: {
320
335
  * hasAwaitAfterDependencies?: boolean
321
336
  * ) =\> void
322
337
  */
323
- readonly asyncModule: "__webpack_require__.a";
324
- readonly asyncModuleExportSymbol: "__webpack_require__.aE";
325
- readonly makeDeferredNamespaceObject: "__webpack_require__.z";
326
- readonly makeDeferredNamespaceObjectSymbol: "__webpack_require__.zS";
327
- };
328
- export declare const isReservedRuntimeGlobal: (r: string) => boolean;
338
+ asyncModule = 72,
339
+ asyncModuleExportSymbol = 73,
340
+ makeDeferredNamespaceObject = 74,
341
+ makeDeferredNamespaceObjectSymbol = 75
342
+ }
343
+ export declare const isReservedRuntimeGlobal: (r: string, compilerRuntimeGlobals: Record<string, string>) => boolean;
344
+ export declare function renderModulePrefix(_compilerOptions: RspackOptionsNormalized): string;
345
+ export declare enum RuntimeVariable {
346
+ Require = 0,
347
+ Modules = 1,
348
+ ModuleCache = 2,
349
+ Module = 3,
350
+ Exports = 4,
351
+ StartupExec = 5
352
+ }
353
+ export declare function renderRuntimeVariables(variable: RuntimeVariable, _compilerOptions?: RspackOptionsNormalized): string;
354
+ export declare function createCompilerRuntimeGlobals(compilerOptions?: RspackOptionsNormalized): typeof RuntimeGlobals;
355
+ declare const DefaultRuntimeGlobals: typeof RuntimeGlobals;
356
+ export { DefaultRuntimeGlobals as RuntimeGlobals };
package/dist/index.js CHANGED
@@ -331,7 +331,7 @@ for(var __rspack_i in (()=>{
331
331
  SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
332
332
  library: ()=>exports_library,
333
333
  node: ()=>exports_node,
334
- RuntimeGlobals: ()=>RuntimeGlobals,
334
+ RuntimeGlobals: ()=>DefaultRuntimeGlobals,
335
335
  rspackVersion: ()=>exports_rspackVersion,
336
336
  util: ()=>util,
337
337
  optimize: ()=>optimize,
@@ -344,7 +344,7 @@ for(var __rspack_i in (()=>{
344
344
  wasm: ()=>exports_wasm,
345
345
  ProgressPlugin: ()=>ProgressPlugin
346
346
  });
347
- var StatsErrorCode, _computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
347
+ var RuntimeGlobals, StatsErrorCode, _computedKey, _computedKey1, _computedKey2, ArrayQueue_computedKey, browserslistTargetHandler_namespaceObject = {};
348
348
  __webpack_require__.r(browserslistTargetHandler_namespaceObject), __webpack_require__.d(browserslistTargetHandler_namespaceObject, {
349
349
  resolve: ()=>browserslistTargetHandler_resolve
350
350
  });
@@ -395,7 +395,7 @@ for(var __rspack_i in (()=>{
395
395
  ProgressPlugin: ()=>ProgressPlugin,
396
396
  ProvidePlugin: ()=>ProvidePlugin,
397
397
  RspackOptionsApply: ()=>RspackOptionsApply,
398
- RuntimeGlobals: ()=>RuntimeGlobals,
398
+ RuntimeGlobals: ()=>DefaultRuntimeGlobals,
399
399
  RuntimeModule: ()=>RuntimeModule,
400
400
  RuntimePlugin: ()=>RuntimePlugin,
401
401
  SourceMapDevToolPlugin: ()=>SourceMapDevToolPlugin,
@@ -5785,7 +5785,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
5785
5785
  }, applyExperimentsDefaults = (experiments, { development })=>{
5786
5786
  F(experiments, "cache", ()=>development), D(experiments, "futureDefaults", !1), D(experiments, "lazyCompilation", !1), D(experiments, "asyncWebAssembly", experiments.futureDefaults), D(experiments, "css", !!experiments.futureDefaults || void 0), D(experiments, "topLevelAwait", !0), D(experiments, "deferImport", !1), D(experiments, "buildHttp", void 0), experiments.buildHttp && "object" == typeof experiments.buildHttp && D(experiments.buildHttp, "upgrade", !1), D(experiments, "incremental", {}), "object" == typeof experiments.incremental && (D(experiments.incremental, "silent", !0), D(experiments.incremental, "make", !0), D(experiments.incremental, "inferAsyncModules", !0), D(experiments.incremental, "providedExports", !0), D(experiments.incremental, "dependenciesDiagnostics", !0), D(experiments.incremental, "sideEffects", !0), D(experiments.incremental, "buildChunkGraph", !1), D(experiments.incremental, "moduleIds", !0), D(experiments.incremental, "chunkIds", !0), D(experiments.incremental, "modulesHashes", !0), D(experiments.incremental, "modulesCodegen", !0), D(experiments.incremental, "modulesRuntimeRequirements", !0), D(experiments.incremental, "chunksRuntimeRequirements", !0), D(experiments.incremental, "chunksHashes", !0), D(experiments.incremental, "chunksRender", !0), D(experiments.incremental, "emitAssets", !0)), D(experiments, "rspackFuture", {}), D(experiments, "parallelCodeSplitting", !1), D(experiments, "parallelLoader", !1), D(experiments, "useInputFileSystem", !1), D(experiments, "inlineConst", !1), D(experiments, "inlineEnum", !1), D(experiments, "typeReexportsPresence", !1), D(experiments, "lazyBarrel", !0);
5787
5787
  }, applybundlerInfoDefaults = (rspackFuture, library)=>{
5788
- "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.7-canary-3faa835a-20251204182618"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
5788
+ "object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.7-canary-5041023c-20251205173645"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
5789
5789
  }, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst, deferImport })=>{
5790
5790
  if (assertNotNill(module1.parser), assertNotNill(module1.generator), cache ? D(module1, "unsafeCache", /[\\/]node_modules[\\/]/) : D(module1, "unsafeCache", !1), F(module1.parser, "asset", ()=>({})), assertNotNill(module1.parser.asset), F(module1.parser.asset, "dataUrlCondition", ()=>({})), "object" == typeof module1.parser.asset.dataUrlCondition && D(module1.parser.asset.dataUrlCondition, "maxSize", 8096), F(module1.parser, "javascript", ()=>({})), assertNotNill(module1.parser.javascript), ((parserOptions, { usedExports, inlineConst, deferImport })=>{
5791
5791
  D(parserOptions, "dynamicImportMode", "lazy"), D(parserOptions, "dynamicImportPrefetch", !1), D(parserOptions, "dynamicImportPreload", !1), D(parserOptions, "url", !0), D(parserOptions, "exprContextCritical", !0), D(parserOptions, "unknownContextCritical", !0), D(parserOptions, "wrappedContextCritical", !1), D(parserOptions, "wrappedContextRegExp", /.*/), D(parserOptions, "strictExportPresence", !1), D(parserOptions, "requireAsExpression", !0), D(parserOptions, "requireDynamic", !0), D(parserOptions, "requireResolve", !0), D(parserOptions, "commonjs", !0), D(parserOptions, "importDynamic", !0), D(parserOptions, "worker", [
@@ -6519,15 +6519,214 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
6519
6519
  if (customKeys) for (let key of Object.keys(customKeys))key in result || (result[key] = customKeys[key]({}));
6520
6520
  return result;
6521
6521
  };
6522
+ function __from_binding_runtime_globals(runtimeRequirements, compilerRuntimeGlobals) {
6523
+ let res = new Set();
6524
+ for (let flag of runtimeRequirements.value)flag in compilerRuntimeGlobals ? res.add(compilerRuntimeGlobals[flag]) : res.add(flag);
6525
+ return res;
6526
+ }
6527
+ function __to_binding_runtime_globals(runtimeRequirements, compilerRuntimeGlobals) {
6528
+ let res = {
6529
+ value: []
6530
+ }, reversedCompilerRuntimeGlobals = Object.fromEntries(Object.entries(compilerRuntimeGlobals).map(([key, value])=>[
6531
+ value,
6532
+ key
6533
+ ]));
6534
+ for (let flag of Array.from(runtimeRequirements)){
6535
+ let item = reversedCompilerRuntimeGlobals[flag];
6536
+ "string" == typeof item ? res.value.push(item) : res.value.push(flag);
6537
+ }
6538
+ return res;
6539
+ }
6540
+ var RuntimeGlobals_RuntimeGlobals = ((RuntimeGlobals = RuntimeGlobals_RuntimeGlobals || {})[RuntimeGlobals.require = 0] = "require", RuntimeGlobals[RuntimeGlobals.requireScope = 1] = "requireScope", RuntimeGlobals[RuntimeGlobals.exports = 2] = "exports", RuntimeGlobals[RuntimeGlobals.thisAsExports = 3] = "thisAsExports", RuntimeGlobals[RuntimeGlobals.returnExportsFromRuntime = 4] = "returnExportsFromRuntime", RuntimeGlobals[RuntimeGlobals.module = 5] = "module", RuntimeGlobals[RuntimeGlobals.moduleId = 6] = "moduleId", RuntimeGlobals[RuntimeGlobals.moduleLoaded = 7] = "moduleLoaded", RuntimeGlobals[RuntimeGlobals.publicPath = 8] = "publicPath", RuntimeGlobals[RuntimeGlobals.entryModuleId = 9] = "entryModuleId", RuntimeGlobals[RuntimeGlobals.moduleCache = 10] = "moduleCache", RuntimeGlobals[RuntimeGlobals.moduleFactories = 11] = "moduleFactories", RuntimeGlobals[RuntimeGlobals.moduleFactoriesAddOnly = 12] = "moduleFactoriesAddOnly", RuntimeGlobals[RuntimeGlobals.ensureChunk = 13] = "ensureChunk", RuntimeGlobals[RuntimeGlobals.ensureChunkHandlers = 14] = "ensureChunkHandlers", RuntimeGlobals[RuntimeGlobals.ensureChunkIncludeEntries = 15] = "ensureChunkIncludeEntries", RuntimeGlobals[RuntimeGlobals.prefetchChunk = 16] = "prefetchChunk", RuntimeGlobals[RuntimeGlobals.prefetchChunkHandlers = 17] = "prefetchChunkHandlers", RuntimeGlobals[RuntimeGlobals.preloadChunk = 18] = "preloadChunk", RuntimeGlobals[RuntimeGlobals.preloadChunkHandlers = 19] = "preloadChunkHandlers", RuntimeGlobals[RuntimeGlobals.definePropertyGetters = 20] = "definePropertyGetters", RuntimeGlobals[RuntimeGlobals.makeNamespaceObject = 21] = "makeNamespaceObject", RuntimeGlobals[RuntimeGlobals.createFakeNamespaceObject = 22] = "createFakeNamespaceObject", RuntimeGlobals[RuntimeGlobals.compatGetDefaultExport = 23] = "compatGetDefaultExport", RuntimeGlobals[RuntimeGlobals.harmonyModuleDecorator = 24] = "harmonyModuleDecorator", RuntimeGlobals[RuntimeGlobals.nodeModuleDecorator = 25] = "nodeModuleDecorator", RuntimeGlobals[RuntimeGlobals.getFullHash = 26] = "getFullHash", RuntimeGlobals[RuntimeGlobals.wasmInstances = 27] = "wasmInstances", RuntimeGlobals[RuntimeGlobals.instantiateWasm = 28] = "instantiateWasm", RuntimeGlobals[RuntimeGlobals.uncaughtErrorHandler = 29] = "uncaughtErrorHandler", RuntimeGlobals[RuntimeGlobals.scriptNonce = 30] = "scriptNonce", RuntimeGlobals[RuntimeGlobals.loadScript = 31] = "loadScript", RuntimeGlobals[RuntimeGlobals.createScript = 32] = "createScript", RuntimeGlobals[RuntimeGlobals.createScriptUrl = 33] = "createScriptUrl", RuntimeGlobals[RuntimeGlobals.getTrustedTypesPolicy = 34] = "getTrustedTypesPolicy", RuntimeGlobals[RuntimeGlobals.hasFetchPriority = 35] = "hasFetchPriority", RuntimeGlobals[RuntimeGlobals.chunkName = 36] = "chunkName", RuntimeGlobals[RuntimeGlobals.runtimeId = 37] = "runtimeId", RuntimeGlobals[RuntimeGlobals.getChunkScriptFilename = 38] = "getChunkScriptFilename", RuntimeGlobals[RuntimeGlobals.getChunkCssFilename = 39] = "getChunkCssFilename", RuntimeGlobals[RuntimeGlobals.rspackVersion = 40] = "rspackVersion", RuntimeGlobals[RuntimeGlobals.hasCssModules = 41] = "hasCssModules", RuntimeGlobals[RuntimeGlobals.rspackUniqueId = 42] = "rspackUniqueId", RuntimeGlobals[RuntimeGlobals.getChunkUpdateScriptFilename = 43] = "getChunkUpdateScriptFilename", RuntimeGlobals[RuntimeGlobals.getChunkUpdateCssFilename = 44] = "getChunkUpdateCssFilename", RuntimeGlobals[RuntimeGlobals.startup = 45] = "startup", RuntimeGlobals[RuntimeGlobals.startupNoDefault = 46] = "startupNoDefault", RuntimeGlobals[RuntimeGlobals.startupOnlyAfter = 47] = "startupOnlyAfter", RuntimeGlobals[RuntimeGlobals.startupOnlyBefore = 48] = "startupOnlyBefore", RuntimeGlobals[RuntimeGlobals.chunkCallback = 49] = "chunkCallback", RuntimeGlobals[RuntimeGlobals.startupEntrypoint = 50] = "startupEntrypoint", RuntimeGlobals[RuntimeGlobals.startupChunkDependencies = 51] = "startupChunkDependencies", RuntimeGlobals[RuntimeGlobals.onChunksLoaded = 52] = "onChunksLoaded", RuntimeGlobals[RuntimeGlobals.externalInstallChunk = 53] = "externalInstallChunk", RuntimeGlobals[RuntimeGlobals.interceptModuleExecution = 54] = "interceptModuleExecution", RuntimeGlobals[RuntimeGlobals.global = 55] = "global", RuntimeGlobals[RuntimeGlobals.shareScopeMap = 56] = "shareScopeMap", RuntimeGlobals[RuntimeGlobals.initializeSharing = 57] = "initializeSharing", RuntimeGlobals[RuntimeGlobals.currentRemoteGetScope = 58] = "currentRemoteGetScope", RuntimeGlobals[RuntimeGlobals.getUpdateManifestFilename = 59] = "getUpdateManifestFilename", RuntimeGlobals[RuntimeGlobals.hmrDownloadManifest = 60] = "hmrDownloadManifest", RuntimeGlobals[RuntimeGlobals.hmrDownloadUpdateHandlers = 61] = "hmrDownloadUpdateHandlers", RuntimeGlobals[RuntimeGlobals.hmrModuleData = 62] = "hmrModuleData", RuntimeGlobals[RuntimeGlobals.hmrInvalidateModuleHandlers = 63] = "hmrInvalidateModuleHandlers", RuntimeGlobals[RuntimeGlobals.hmrRuntimeStatePrefix = 64] = "hmrRuntimeStatePrefix", RuntimeGlobals[RuntimeGlobals.amdDefine = 65] = "amdDefine", RuntimeGlobals[RuntimeGlobals.amdOptions = 66] = "amdOptions", RuntimeGlobals[RuntimeGlobals.system = 67] = "system", RuntimeGlobals[RuntimeGlobals.hasOwnProperty = 68] = "hasOwnProperty", RuntimeGlobals[RuntimeGlobals.systemContext = 69] = "systemContext", RuntimeGlobals[RuntimeGlobals.baseURI = 70] = "baseURI", RuntimeGlobals[RuntimeGlobals.relativeUrl = 71] = "relativeUrl", RuntimeGlobals[RuntimeGlobals.asyncModule = 72] = "asyncModule", RuntimeGlobals[RuntimeGlobals.asyncModuleExportSymbol = 73] = "asyncModuleExportSymbol", RuntimeGlobals[RuntimeGlobals.makeDeferredNamespaceObject = 74] = "makeDeferredNamespaceObject", RuntimeGlobals[RuntimeGlobals.makeDeferredNamespaceObjectSymbol = 75] = "makeDeferredNamespaceObjectSymbol", RuntimeGlobals);
6541
+ function renderRuntimeVariables(variable, _compilerOptions) {
6542
+ switch(variable){
6543
+ case 0:
6544
+ return "__webpack_require__";
6545
+ case 1:
6546
+ return "__webpack_modules__";
6547
+ case 2:
6548
+ return "__webpack_module_cache__";
6549
+ case 3:
6550
+ return "__webpack_module__";
6551
+ case 4:
6552
+ return "__webpack_exports__";
6553
+ case 5:
6554
+ return "__webpack_exec__";
6555
+ }
6556
+ }
6557
+ function createCompilerRuntimeGlobals(compilerOptions) {
6558
+ let res = {};
6559
+ for (let key of Object.keys(RuntimeGlobals_RuntimeGlobals))res[key] = function(runtimeGlobals, _compilerOptions) {
6560
+ let scope_name = renderRuntimeVariables(0, _compilerOptions), exports_name = renderRuntimeVariables(4, _compilerOptions);
6561
+ switch(runtimeGlobals){
6562
+ case 0:
6563
+ return scope_name;
6564
+ case 1:
6565
+ return `${scope_name}.*`;
6566
+ case 2:
6567
+ return exports_name;
6568
+ case 3:
6569
+ return "top-level-this-exports";
6570
+ case 4:
6571
+ return "return-exports-from-runtime";
6572
+ case 5:
6573
+ return "module";
6574
+ case 6:
6575
+ return "module.id";
6576
+ case 7:
6577
+ return "module.loaded";
6578
+ case 8:
6579
+ return `${scope_name}.p`;
6580
+ case 9:
6581
+ return `${scope_name}.s`;
6582
+ case 10:
6583
+ return `${scope_name}.c`;
6584
+ case 11:
6585
+ return `${scope_name}.m`;
6586
+ case 12:
6587
+ return `${scope_name}.m (add only)`;
6588
+ case 13:
6589
+ return `${scope_name}.e`;
6590
+ case 14:
6591
+ return `${scope_name}.f`;
6592
+ case 15:
6593
+ return `${scope_name}.f (include entries)`;
6594
+ case 16:
6595
+ return `${scope_name}.E`;
6596
+ case 17:
6597
+ return `${scope_name}.F`;
6598
+ case 18:
6599
+ return `${scope_name}.G`;
6600
+ case 19:
6601
+ return `${scope_name}.H`;
6602
+ case 20:
6603
+ return `${scope_name}.d`;
6604
+ case 21:
6605
+ return `${scope_name}.r`;
6606
+ case 22:
6607
+ return `${scope_name}.t`;
6608
+ case 23:
6609
+ return `${scope_name}.n`;
6610
+ case 24:
6611
+ return `${scope_name}.hmd`;
6612
+ case 25:
6613
+ return `${scope_name}.nmd`;
6614
+ case 26:
6615
+ return `${scope_name}.h`;
6616
+ case 27:
6617
+ return `${scope_name}.w`;
6618
+ case 28:
6619
+ return `${scope_name}.v`;
6620
+ case 29:
6621
+ return `${scope_name}.oe`;
6622
+ case 30:
6623
+ return `${scope_name}.nc`;
6624
+ case 31:
6625
+ return `${scope_name}.l`;
6626
+ case 32:
6627
+ return `${scope_name}.ts`;
6628
+ case 33:
6629
+ return `${scope_name}.tu`;
6630
+ case 34:
6631
+ return `${scope_name}.tt`;
6632
+ case 35:
6633
+ return "has fetch priority";
6634
+ case 36:
6635
+ return `${scope_name}.cn`;
6636
+ case 37:
6637
+ return `${scope_name}.j`;
6638
+ case 38:
6639
+ return `${scope_name}.u`;
6640
+ case 39:
6641
+ return `${scope_name}.k`;
6642
+ case 40:
6643
+ return `${scope_name}.rv`;
6644
+ case 41:
6645
+ return "has css modules";
6646
+ case 42:
6647
+ return `${scope_name}.ruid`;
6648
+ case 43:
6649
+ return `${scope_name}.hu`;
6650
+ case 44:
6651
+ return `${scope_name}.hk`;
6652
+ case 45:
6653
+ return `${scope_name}.x`;
6654
+ case 46:
6655
+ return `${scope_name}.x (no default handler)`;
6656
+ case 47:
6657
+ return `${scope_name}.x (only after)`;
6658
+ case 48:
6659
+ return `${scope_name}.x (only before)`;
6660
+ case 49:
6661
+ return "global chunk callback";
6662
+ case 50:
6663
+ return `${scope_name}.X`;
6664
+ case 51:
6665
+ return `${scope_name}.x (chunk dependencies)`;
6666
+ case 52:
6667
+ return `${scope_name}.O`;
6668
+ case 53:
6669
+ return `${scope_name}.C`;
6670
+ case 54:
6671
+ return `${scope_name}.i`;
6672
+ case 55:
6673
+ return `${scope_name}.g`;
6674
+ case 56:
6675
+ return `${scope_name}.S`;
6676
+ case 57:
6677
+ return `${scope_name}.I`;
6678
+ case 58:
6679
+ return `${scope_name}.R`;
6680
+ case 59:
6681
+ return `${scope_name}.hmrF`;
6682
+ case 60:
6683
+ return `${scope_name}.hmrM`;
6684
+ case 61:
6685
+ return `${scope_name}.hmrC`;
6686
+ case 62:
6687
+ return `${scope_name}.hmrD`;
6688
+ case 63:
6689
+ return `${scope_name}.hmrI`;
6690
+ case 64:
6691
+ return `${scope_name}.hmrS`;
6692
+ case 65:
6693
+ return `${scope_name}.amdD`;
6694
+ case 66:
6695
+ return `${scope_name}.amdO`;
6696
+ case 67:
6697
+ return `${scope_name}.System`;
6698
+ case 68:
6699
+ return `${scope_name}.o`;
6700
+ case 69:
6701
+ return `${scope_name}.y`;
6702
+ case 70:
6703
+ return `${scope_name}.b`;
6704
+ case 71:
6705
+ return `${scope_name}.U`;
6706
+ case 72:
6707
+ return `${scope_name}.a`;
6708
+ case 73:
6709
+ return `${scope_name}.aE`;
6710
+ case 74:
6711
+ return `${scope_name}.z`;
6712
+ case 75:
6713
+ return `${scope_name}.zS`;
6714
+ default:
6715
+ return "";
6716
+ }
6717
+ }(RuntimeGlobals_RuntimeGlobals[key], compilerOptions);
6718
+ return res;
6719
+ }
6720
+ let DefaultRuntimeGlobals = createCompilerRuntimeGlobals();
6522
6721
  class ExecuteModulePlugin {
6523
6722
  apply(compiler) {
6524
6723
  compiler.hooks.thisCompilation.tap("executeModule", (compilation)=>{
6525
6724
  compiler.__internal__get_module_execution_results_map().clear(), compilation.hooks.executeModule.tap("executeModule", (options, context)=>{
6526
6725
  let vm = __webpack_require__("node:vm"), moduleObject = options.moduleObject, source = options.codeGenerationResult.get("javascript");
6527
6726
  if (void 0 !== source) try {
6528
- vm.runInThisContext(`(function(module, __webpack_module__, __webpack_exports__, exports, ${RuntimeGlobals.require}) {\n${source}\n})`, {
6727
+ vm.runInThisContext(`(function(module, ${renderRuntimeVariables(3, compiler.options)}, ${renderRuntimeVariables(4, compiler.options)}, exports, ${renderRuntimeVariables(0, compiler.options)}) {\n${source}\n})`, {
6529
6728
  filename: moduleObject.id
6530
- }).call(moduleObject.exports, moduleObject, moduleObject, moduleObject.exports, moduleObject.exports, context.__webpack_require__);
6729
+ }).call(moduleObject.exports, moduleObject, moduleObject, moduleObject.exports, moduleObject.exports, context[renderRuntimeVariables(0, compiler.options)]);
6531
6730
  } catch (e) {
6532
6731
  let err = e instanceof Error ? e : Error(e);
6533
6732
  throw err.stack += printGeneratedCodeForStack(moduleObject.id, source), err;
@@ -7093,98 +7292,6 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7093
7292
  this.references = new Map(), this.builtinReferences = new Map();
7094
7293
  }
7095
7294
  }
7096
- let RESERVED_RUNTIME_GLOBALS = new Map();
7097
- function __from_binding_runtime_globals(runtimeRequirements) {
7098
- let res = new Set();
7099
- for (let flag of runtimeRequirements.value)flag in RuntimeGlobals ? res.add(RuntimeGlobals[flag]) : res.add(flag);
7100
- return res;
7101
- }
7102
- function __to_binding_runtime_globals(runtimeRequirements) {
7103
- let res = {
7104
- value: []
7105
- };
7106
- for (let flag of Array.from(runtimeRequirements)){
7107
- let item = RESERVED_RUNTIME_GLOBALS.get(flag);
7108
- "string" == typeof item ? res.value.push(item) : res.value.push(flag);
7109
- }
7110
- return res;
7111
- }
7112
- let RuntimeGlobals = {
7113
- require: "__webpack_require__",
7114
- requireScope: "__webpack_require__.*",
7115
- exports: "__webpack_exports__",
7116
- thisAsExports: "top-level-this-exports",
7117
- returnExportsFromRuntime: "return-exports-from-runtime",
7118
- module: "module",
7119
- moduleId: "module.id",
7120
- moduleLoaded: "module.loaded",
7121
- publicPath: "__webpack_require__.p",
7122
- entryModuleId: "__webpack_require__.s",
7123
- moduleCache: "__webpack_require__.c",
7124
- moduleFactories: "__webpack_require__.m",
7125
- moduleFactoriesAddOnly: "__webpack_require__.m (add only)",
7126
- ensureChunk: "__webpack_require__.e",
7127
- ensureChunkHandlers: "__webpack_require__.f",
7128
- ensureChunkIncludeEntries: "__webpack_require__.f (include entries)",
7129
- prefetchChunk: "__webpack_require__.E",
7130
- prefetchChunkHandlers: "__webpack_require__.F",
7131
- preloadChunk: "__webpack_require__.G",
7132
- preloadChunkHandlers: "__webpack_require__.H",
7133
- definePropertyGetters: "__webpack_require__.d",
7134
- makeNamespaceObject: "__webpack_require__.r",
7135
- createFakeNamespaceObject: "__webpack_require__.t",
7136
- compatGetDefaultExport: "__webpack_require__.n",
7137
- harmonyModuleDecorator: "__webpack_require__.hmd",
7138
- nodeModuleDecorator: "__webpack_require__.nmd",
7139
- getFullHash: "__webpack_require__.h",
7140
- wasmInstances: "__webpack_require__.w",
7141
- instantiateWasm: "__webpack_require__.v",
7142
- uncaughtErrorHandler: "__webpack_require__.oe",
7143
- scriptNonce: "__webpack_require__.nc",
7144
- loadScript: "__webpack_require__.l",
7145
- createScript: "__webpack_require__.ts",
7146
- createScriptUrl: "__webpack_require__.tu",
7147
- getTrustedTypesPolicy: "__webpack_require__.tt",
7148
- hasFetchPriority: "has fetch priority",
7149
- chunkName: "__webpack_require__.cn",
7150
- runtimeId: "__webpack_require__.j",
7151
- getChunkScriptFilename: "__webpack_require__.u",
7152
- getChunkCssFilename: "__webpack_require__.k",
7153
- hasCssModules: "has css modules",
7154
- getChunkUpdateScriptFilename: "__webpack_require__.hu",
7155
- getChunkUpdateCssFilename: "__webpack_require__.hk",
7156
- startup: "__webpack_require__.x",
7157
- startupNoDefault: "__webpack_require__.x (no default handler)",
7158
- startupOnlyAfter: "__webpack_require__.x (only after)",
7159
- startupOnlyBefore: "__webpack_require__.x (only before)",
7160
- chunkCallback: "webpackChunk",
7161
- startupEntrypoint: "__webpack_require__.X",
7162
- onChunksLoaded: "__webpack_require__.O",
7163
- externalInstallChunk: "__webpack_require__.C",
7164
- interceptModuleExecution: "__webpack_require__.i",
7165
- global: "__webpack_require__.g",
7166
- shareScopeMap: "__webpack_require__.S",
7167
- initializeSharing: "__webpack_require__.I",
7168
- currentRemoteGetScope: "__webpack_require__.R",
7169
- getUpdateManifestFilename: "__webpack_require__.hmrF",
7170
- hmrDownloadManifest: "__webpack_require__.hmrM",
7171
- hmrDownloadUpdateHandlers: "__webpack_require__.hmrC",
7172
- hmrModuleData: "__webpack_require__.hmrD",
7173
- hmrInvalidateModuleHandlers: "__webpack_require__.hmrI",
7174
- hmrRuntimeStatePrefix: "__webpack_require__.hmrS",
7175
- amdDefine: "__webpack_require__.amdD",
7176
- amdOptions: "__webpack_require__.amdO",
7177
- system: "__webpack_require__.System",
7178
- hasOwnProperty: "__webpack_require__.o",
7179
- systemContext: "__webpack_require__.y",
7180
- baseURI: "__webpack_require__.b",
7181
- relativeUrl: "__webpack_require__.U",
7182
- asyncModule: "__webpack_require__.a",
7183
- asyncModuleExportSymbol: "__webpack_require__.aE",
7184
- makeDeferredNamespaceObject: "__webpack_require__.z",
7185
- makeDeferredNamespaceObjectSymbol: "__webpack_require__.zS"
7186
- };
7187
- for (let entry of Object.entries(RuntimeGlobals))RESERVED_RUNTIME_GLOBALS.set(entry[1], entry[0]);
7188
7295
  class CodeGenerationResult {
7189
7296
  #inner;
7190
7297
  constructor(result){
@@ -7438,7 +7545,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
7438
7545
  });
7439
7546
  }
7440
7547
  }
7441
- let CORE_VERSION = "1.6.7-canary-3faa835a-20251204182618", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
7548
+ let CORE_VERSION = "1.6.7-canary-5041023c-20251205173645", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
7442
7549
 
7443
7550
  Help:
7444
7551
  Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
@@ -7828,7 +7935,15 @@ Help:
7828
7935
  "entry"
7829
7936
  ]),
7830
7937
  additionalPass: new lite_tapable_namespaceObject.AsyncSeriesHook([])
7831
- }, this.webpack = src_rspack_0, this.rspack = src_rspack_0, this.root = this, this.outputPath = "", this.inputFileSystem = null, this.intermediateFileSystem = null, this.outputFileSystem = null, this.watchFileSystem = null, this.records = {}, this.options = options, this.context = context, this.cache = new Cache(), this.compilerPath = "", this.running = !1, this.idle = !1, this.watchMode = !1, this.__internal_browser_require = ()=>{
7938
+ };
7939
+ const compilerRuntimeGlobals = createCompilerRuntimeGlobals(options);
7940
+ this.webpack = {
7941
+ ...src_rspack_0,
7942
+ RuntimeGlobals: compilerRuntimeGlobals
7943
+ }, this.rspack = {
7944
+ ...src_rspack_0,
7945
+ RuntimeGlobals: compilerRuntimeGlobals
7946
+ }, this.root = this, this.outputPath = "", this.inputFileSystem = null, this.intermediateFileSystem = null, this.outputFileSystem = null, this.watchFileSystem = null, this.records = {}, this.options = options, this.context = context, this.cache = new Cache(), this.compilerPath = "", this.running = !1, this.idle = !1, this.watchMode = !1, this.__internal_browser_require = ()=>{
7832
7947
  throw Error("Cannot execute user defined code in browser without `BrowserRequirePlugin`");
7833
7948
  }, this.resolverFactory = new ResolverFactory(options.resolve.pnp ?? getPnpDefault(), options.resolve, options.resolveLoader), new JsLoaderRspackPlugin(this).apply(this), new ExecuteModulePlugin().apply(this), new TraceHookPlugin().apply(this);
7834
7949
  }
@@ -8199,9 +8314,9 @@ Help:
8199
8314
  return getCompiler2().__internal__get_compilation().hooks.additionalTreeRuntimeRequirements;
8200
8315
  }, function(queried) {
8201
8316
  return function({ chunk, runtimeRequirements }) {
8202
- let set = __from_binding_runtime_globals(runtimeRequirements);
8317
+ let set = __from_binding_runtime_globals(runtimeRequirements, getCompiler2().rspack.RuntimeGlobals);
8203
8318
  return queried.call(chunk, set), {
8204
- runtimeRequirements: __to_binding_runtime_globals(set)
8319
+ runtimeRequirements: __to_binding_runtime_globals(set, getCompiler2().rspack.RuntimeGlobals)
8205
8320
  };
8206
8321
  };
8207
8322
  }),
@@ -8209,14 +8324,14 @@ Help:
8209
8324
  return getCompiler2().__internal__get_compilation().hooks.runtimeRequirementInTree;
8210
8325
  }, function(queried) {
8211
8326
  return function({ chunk, allRuntimeRequirements, runtimeRequirements }) {
8212
- let set = __from_binding_runtime_globals(runtimeRequirements), all = __from_binding_runtime_globals(allRuntimeRequirements), customRuntimeGlobals = new Set(), originalAdd = all.add.bind(all), add = function(r) {
8327
+ let set = __from_binding_runtime_globals(runtimeRequirements, getCompiler2().rspack.RuntimeGlobals), all = __from_binding_runtime_globals(allRuntimeRequirements, getCompiler2().rspack.RuntimeGlobals), customRuntimeGlobals = new Set(), originalAdd = all.add.bind(all), add = function(r) {
8213
8328
  let r1;
8214
- return all.has(r) ? all : (r1 = r, RESERVED_RUNTIME_GLOBALS.has(r1) || customRuntimeGlobals.add(r), originalAdd(r));
8329
+ return all.has(r) ? all : (r1 = r, Object.values(getCompiler2().rspack.RuntimeGlobals).includes(r1) || customRuntimeGlobals.add(r), originalAdd(r));
8215
8330
  };
8216
8331
  for (let r of (all.add = add.bind(add), set))queried.for(r).call(chunk, all);
8217
8332
  for (let r of customRuntimeGlobals)queried.for(r).call(chunk, all);
8218
8333
  return {
8219
- allRuntimeRequirements: __to_binding_runtime_globals(all)
8334
+ allRuntimeRequirements: __to_binding_runtime_globals(all, getCompiler2().rspack.RuntimeGlobals)
8220
8335
  };
8221
8336
  };
8222
8337
  }),
@@ -8256,7 +8371,7 @@ Help:
8256
8371
  }, function(queried) {
8257
8372
  return function({ entry, id, codegenResults, runtimeModules }) {
8258
8373
  try {
8259
- let __nested_webpack_require_4781_4800__ = (id)=>{
8374
+ let RuntimeGlobals = getCompiler2().rspack.RuntimeGlobals, moduleRequireFn = (id)=>{
8260
8375
  let cached = moduleCache[id];
8261
8376
  if (void 0 !== cached) {
8262
8377
  if (cached.error) throw cached.error;
@@ -8270,7 +8385,7 @@ Help:
8270
8385
  loaded: !1,
8271
8386
  error: void 0
8272
8387
  },
8273
- require: __nested_webpack_require_4781_4800__
8388
+ require: moduleRequireFn
8274
8389
  };
8275
8390
  for (let handler of interceptModuleExecution)handler(execOptions);
8276
8391
  let result = codegenResults.map[id]["build time"], moduleObject = execOptions.module;
@@ -8285,11 +8400,11 @@ Help:
8285
8400
  codeGenerationResult: new CodeGenerationResult(result),
8286
8401
  moduleObject
8287
8402
  }, {
8288
- __webpack_require__: __nested_webpack_require_4781_4800__
8403
+ [`${RuntimeGlobals.require}`]: moduleRequireFn
8289
8404
  }), "Compilation.hooks.executeModule"), moduleObject.loaded = !0, moduleObject.exports;
8290
- }, moduleCache = __nested_webpack_require_4781_4800__[RuntimeGlobals.moduleCache.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = __nested_webpack_require_4781_4800__[RuntimeGlobals.interceptModuleExecution.replace(`${RuntimeGlobals.require}.`, "")] = [];
8291
- for (let runtimeModule of runtimeModules)__nested_webpack_require_4781_4800__(runtimeModule);
8292
- let executeResult = __nested_webpack_require_4781_4800__(entry);
8405
+ }, moduleCache = moduleRequireFn[`${RuntimeGlobals.moduleCache}`.replace(`${RuntimeGlobals.require}.`, "")] = {}, interceptModuleExecution = moduleRequireFn[`${RuntimeGlobals.interceptModuleExecution}`.replace(`${RuntimeGlobals.require}.`, "")] = [];
8406
+ for (let runtimeModule of runtimeModules)moduleRequireFn(runtimeModule);
8407
+ let executeResult = moduleRequireFn(entry);
8293
8408
  getCompiler2().__internal__get_module_execution_results_map().set(id, executeResult);
8294
8409
  } catch (e) {
8295
8410
  throw getCompiler2().__internal__get_module_execution_results_map().set(id, e), e;
@@ -8739,7 +8854,7 @@ Help:
8739
8854
  obj.children = this.stats.map((stat, idx)=>{
8740
8855
  let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
8741
8856
  return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
8742
- }), childOptions.version && (obj.rspackVersion = "1.6.7-canary-3faa835a-20251204182618", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8857
+ }), childOptions.version && (obj.rspackVersion = "1.6.7-canary-5041023c-20251205173645", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
8743
8858
  let mapError = (j, obj)=>({
8744
8859
  ...obj,
8745
8860
  compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
@@ -9638,7 +9753,7 @@ Help:
9638
9753
  object.hash = context.getStatsCompilation(compilation).hash;
9639
9754
  },
9640
9755
  version: (object)=>{
9641
- object.version = "5.75.0", object.rspackVersion = "1.6.7-canary-3faa835a-20251204182618";
9756
+ object.version = "5.75.0", object.rspackVersion = "1.6.7-canary-5041023c-20251205173645";
9642
9757
  },
9643
9758
  env: (object, _compilation, _context, { _env })=>{
9644
9759
  object.env = _env;
@@ -11857,7 +11972,7 @@ Help:
11857
11972
  let _options = JSON.stringify(options || {});
11858
11973
  return binding_default().transform(source, _options);
11859
11974
  }
11860
- let exports_rspackVersion = "1.6.7-canary-3faa835a-20251204182618", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
11975
+ let exports_rspackVersion = "1.6.7-canary-5041023c-20251205173645", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
11861
11976
  getNormalizedRspackOptions: getNormalizedRspackOptions,
11862
11977
  applyRspackOptionsDefaults: applyRspackOptionsDefaults,
11863
11978
  getNormalizedWebpackOptions: getNormalizedRspackOptions,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack-canary/core",
3
- "version": "1.6.7-canary-3faa835a-20251204182618",
3
+ "version": "1.6.7-canary-5041023c-20251205173645",
4
4
  "webpackVersion": "5.75.0",
5
5
  "license": "MIT",
6
6
  "description": "The fast Rust-based web bundler with webpack-compatible API",
@@ -58,7 +58,7 @@
58
58
  "dependencies": {
59
59
  "@module-federation/runtime-tools": "0.21.6",
60
60
  "@rspack/lite-tapable": "1.1.0",
61
- "@rspack/binding": "npm:@rspack-canary/binding@1.6.7-canary-3faa835a-20251204182618"
61
+ "@rspack/binding": "npm:@rspack-canary/binding@1.6.7-canary-5041023c-20251205173645"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@swc/helpers": ">=0.5.1"