@rspack-canary/browser 1.6.8-canary-dfa25db9-20251214173359 → 1.6.8-canary-2fd81281-20251216180302
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/Compilation.d.ts +24 -4
- package/dist/Resolver.d.ts +2 -2
- package/dist/builtin-plugin/lazy-compilation/middleware.d.ts +8 -0
- package/dist/config/types.d.ts +12 -1
- package/dist/exports.d.ts +4 -0
- package/dist/index.mjs +95 -51
- package/dist/lib/EntryOptionPlugin.d.ts +1 -1
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/dist/util/fake.d.ts +6 -1
- package/package.json +1 -1
package/dist/Compilation.d.ts
CHANGED
|
@@ -289,9 +289,14 @@ export declare class Compilation {
|
|
|
289
289
|
getLogger(name: string | (() => string)): Logger;
|
|
290
290
|
fileDependencies: {
|
|
291
291
|
[Symbol.iterator](): Generator<string, void, unknown>;
|
|
292
|
-
has(dep: string)
|
|
292
|
+
has: (dep: string) => boolean;
|
|
293
293
|
add: (dep: string) => void;
|
|
294
294
|
addAll: (deps: Iterable<string>) => void;
|
|
295
|
+
delete: (dep: string) => boolean;
|
|
296
|
+
keys(): SetIterator<string>;
|
|
297
|
+
values(): SetIterator<string>;
|
|
298
|
+
entries(): SetIterator<[string, string]>;
|
|
299
|
+
readonly size: number;
|
|
295
300
|
};
|
|
296
301
|
get __internal__addedFileDependencies(): string[];
|
|
297
302
|
get __internal__removedFileDependencies(): string[];
|
|
@@ -301,21 +306,36 @@ export declare class Compilation {
|
|
|
301
306
|
get __internal__removedMissingDependencies(): string[];
|
|
302
307
|
contextDependencies: {
|
|
303
308
|
[Symbol.iterator](): Generator<string, void, unknown>;
|
|
304
|
-
has(dep: string)
|
|
309
|
+
has: (dep: string) => boolean;
|
|
305
310
|
add: (dep: string) => void;
|
|
306
311
|
addAll: (deps: Iterable<string>) => void;
|
|
312
|
+
delete: (dep: string) => boolean;
|
|
313
|
+
keys(): SetIterator<string>;
|
|
314
|
+
values(): SetIterator<string>;
|
|
315
|
+
entries(): SetIterator<[string, string]>;
|
|
316
|
+
readonly size: number;
|
|
307
317
|
};
|
|
308
318
|
missingDependencies: {
|
|
309
319
|
[Symbol.iterator](): Generator<string, void, unknown>;
|
|
310
|
-
has(dep: string)
|
|
320
|
+
has: (dep: string) => boolean;
|
|
311
321
|
add: (dep: string) => void;
|
|
312
322
|
addAll: (deps: Iterable<string>) => void;
|
|
323
|
+
delete: (dep: string) => boolean;
|
|
324
|
+
keys(): SetIterator<string>;
|
|
325
|
+
values(): SetIterator<string>;
|
|
326
|
+
entries(): SetIterator<[string, string]>;
|
|
327
|
+
readonly size: number;
|
|
313
328
|
};
|
|
314
329
|
buildDependencies: {
|
|
315
330
|
[Symbol.iterator](): Generator<string, void, unknown>;
|
|
316
|
-
has(dep: string)
|
|
331
|
+
has: (dep: string) => boolean;
|
|
317
332
|
add: (dep: string) => void;
|
|
318
333
|
addAll: (deps: Iterable<string>) => void;
|
|
334
|
+
delete: (dep: string) => boolean;
|
|
335
|
+
keys(): SetIterator<string>;
|
|
336
|
+
values(): SetIterator<string>;
|
|
337
|
+
entries(): SetIterator<[string, string]>;
|
|
338
|
+
readonly size: number;
|
|
319
339
|
};
|
|
320
340
|
getStats(): Stats;
|
|
321
341
|
createChildCompiler(name: string, outputOptions: OutputNormalized, plugins: RspackPluginInstance[]): Compiler;
|
package/dist/Resolver.d.ts
CHANGED
|
@@ -25,6 +25,6 @@ export interface ResolveRequest {
|
|
|
25
25
|
export declare class Resolver {
|
|
26
26
|
#private;
|
|
27
27
|
constructor(binding: binding.JsResolver);
|
|
28
|
-
resolveSync(
|
|
29
|
-
resolve(
|
|
28
|
+
resolveSync(_context: object, path: string, request: string): string | false;
|
|
29
|
+
resolve(_context: object, path: string, request: string, resolveContext: ResolveContext, callback: ResolveCallback): void;
|
|
30
30
|
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import { type Compiler, MultiCompiler } from "../..";
|
|
2
2
|
import type { MiddlewareHandler } from "../../config/devServer";
|
|
3
3
|
export declare const LAZY_COMPILATION_PREFIX = "/lazy-compilation-using-";
|
|
4
|
+
/**
|
|
5
|
+
* Create a middleware that handles lazy compilation requests from the client.
|
|
6
|
+
* This function returns an Express-style middleware that listens for
|
|
7
|
+
* requests triggered by lazy compilation in the dev server client,
|
|
8
|
+
* then invokes the Rspack compiler to compile modules on demand.
|
|
9
|
+
* Use this middleware when integrating lazy compilation into a
|
|
10
|
+
* custom development server instead of relying on the built-in server.
|
|
11
|
+
*/
|
|
4
12
|
export declare const lazyCompilationMiddleware: (compiler: Compiler | MultiCompiler) => MiddlewareHandler;
|
package/dist/config/types.d.ts
CHANGED
|
@@ -2333,7 +2333,18 @@ export type RspackOptions = {
|
|
|
2333
2333
|
*/
|
|
2334
2334
|
loader?: Loader;
|
|
2335
2335
|
/**
|
|
2336
|
-
*
|
|
2336
|
+
* Tells Rspack to suppress specific compilation warnings by matching their
|
|
2337
|
+
* message, module, or file, or by using a custom function.
|
|
2338
|
+
*
|
|
2339
|
+
* @example
|
|
2340
|
+
* ```js
|
|
2341
|
+
* export default {
|
|
2342
|
+
* ignoreWarnings: [
|
|
2343
|
+
* /warning from compiler/,
|
|
2344
|
+
* { file: /node_modules/ },
|
|
2345
|
+
* ],
|
|
2346
|
+
* };
|
|
2347
|
+
* ```
|
|
2337
2348
|
*/
|
|
2338
2349
|
ignoreWarnings?: IgnoreWarnings;
|
|
2339
2350
|
/**
|
package/dist/exports.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ interface Node {
|
|
|
68
68
|
NodeTemplatePlugin: typeof NodeTemplatePlugin;
|
|
69
69
|
NodeEnvironmentPlugin: typeof NodeEnvironmentPlugin;
|
|
70
70
|
}
|
|
71
|
+
export { lazyCompilationMiddleware };
|
|
71
72
|
export declare const node: Node;
|
|
72
73
|
import { ElectronTargetPlugin } from "./builtin-plugin";
|
|
73
74
|
interface Electron {
|
|
@@ -146,6 +147,9 @@ interface Experiments {
|
|
|
146
147
|
RstestPlugin: typeof RstestPlugin;
|
|
147
148
|
RslibPlugin: typeof RslibPlugin;
|
|
148
149
|
SubresourceIntegrityPlugin: typeof SubresourceIntegrityPlugin;
|
|
150
|
+
/**
|
|
151
|
+
* @deprecated Use `rspack.lazyCompilationMiddleware` instead
|
|
152
|
+
*/
|
|
149
153
|
lazyCompilationMiddleware: typeof lazyCompilationMiddleware;
|
|
150
154
|
swc: {
|
|
151
155
|
transform: typeof transform;
|
package/dist/index.mjs
CHANGED
|
@@ -50616,6 +50616,7 @@ __webpack_require__.d(exports_namespaceObject, {
|
|
|
50616
50616
|
electron: ()=>electron,
|
|
50617
50617
|
experiments: ()=>exports_experiments,
|
|
50618
50618
|
javascript: ()=>javascript,
|
|
50619
|
+
lazyCompilationMiddleware: ()=>lazyCompilationMiddleware,
|
|
50619
50620
|
library: ()=>exports_library,
|
|
50620
50621
|
node: ()=>exports_node,
|
|
50621
50622
|
optimize: ()=>optimize,
|
|
@@ -51805,22 +51806,49 @@ class MergeCaller {
|
|
|
51805
51806
|
}
|
|
51806
51807
|
function createFakeCompilationDependencies(getDeps, addDeps) {
|
|
51807
51808
|
const addDepsCaller = new MergeCaller(addDeps);
|
|
51809
|
+
const deletedDeps = new Set();
|
|
51810
|
+
const hasDep = (dep)=>{
|
|
51811
|
+
if (deletedDeps.has(dep)) return false;
|
|
51812
|
+
return addDepsCaller.pendingData().includes(dep) || getDeps().includes(dep);
|
|
51813
|
+
};
|
|
51814
|
+
const getAllDeps = ()=>{
|
|
51815
|
+
const deps = new Set([
|
|
51816
|
+
...getDeps(),
|
|
51817
|
+
...addDepsCaller.pendingData()
|
|
51818
|
+
]);
|
|
51819
|
+
for (const deleted of deletedDeps)deps.delete(deleted);
|
|
51820
|
+
return deps;
|
|
51821
|
+
};
|
|
51808
51822
|
return {
|
|
51809
51823
|
*[Symbol.iterator] () {
|
|
51810
|
-
const deps =
|
|
51811
|
-
...getDeps(),
|
|
51812
|
-
...addDepsCaller.pendingData()
|
|
51813
|
-
]);
|
|
51824
|
+
const deps = getAllDeps();
|
|
51814
51825
|
for (const dep of deps)yield dep;
|
|
51815
51826
|
},
|
|
51816
|
-
has
|
|
51817
|
-
return addDepsCaller.pendingData().includes(dep) || getDeps().includes(dep);
|
|
51818
|
-
},
|
|
51827
|
+
has: hasDep,
|
|
51819
51828
|
add: (dep)=>{
|
|
51829
|
+
deletedDeps.delete(dep);
|
|
51820
51830
|
addDepsCaller.push(dep);
|
|
51821
51831
|
},
|
|
51822
51832
|
addAll: (deps)=>{
|
|
51833
|
+
for (const dep of deps)deletedDeps.delete(dep);
|
|
51823
51834
|
addDepsCaller.push(...deps);
|
|
51835
|
+
},
|
|
51836
|
+
delete: (dep)=>{
|
|
51837
|
+
const hadDep = hasDep(dep);
|
|
51838
|
+
if (hadDep) deletedDeps.add(dep);
|
|
51839
|
+
return hadDep;
|
|
51840
|
+
},
|
|
51841
|
+
keys () {
|
|
51842
|
+
return getAllDeps().keys();
|
|
51843
|
+
},
|
|
51844
|
+
values () {
|
|
51845
|
+
return getAllDeps().values();
|
|
51846
|
+
},
|
|
51847
|
+
entries () {
|
|
51848
|
+
return getAllDeps().entries();
|
|
51849
|
+
},
|
|
51850
|
+
get size () {
|
|
51851
|
+
return getAllDeps().size;
|
|
51824
51852
|
}
|
|
51825
51853
|
};
|
|
51826
51854
|
}
|
|
@@ -52594,7 +52622,7 @@ BREAKING CHANGE: Asset processing hooks in Compilation has been merged into a si
|
|
|
52594
52622
|
processAssetsHook.tap(getOptions(options), ()=>fn(...getArgs()));
|
|
52595
52623
|
},
|
|
52596
52624
|
tapAsync: (options, fn)=>{
|
|
52597
|
-
processAssetsHook.tapAsync(getOptions(options), (
|
|
52625
|
+
processAssetsHook.tapAsync(getOptions(options), (_assets, callback)=>fn(...getArgs(), callback));
|
|
52598
52626
|
},
|
|
52599
52627
|
tapPromise: (options, fn)=>{
|
|
52600
52628
|
processAssetsHook.tapPromise(getOptions(options), ()=>fn(...getArgs()));
|
|
@@ -53219,7 +53247,7 @@ class EntryOptionPlugin {
|
|
|
53219
53247
|
for (const entry of desc.import)new EntryPlugin(context, entry, options).apply(compiler);
|
|
53220
53248
|
}
|
|
53221
53249
|
}
|
|
53222
|
-
static entryDescriptionToOptions(
|
|
53250
|
+
static entryDescriptionToOptions(_compiler, name, desc) {
|
|
53223
53251
|
const options = {
|
|
53224
53252
|
name,
|
|
53225
53253
|
filename: desc.filename,
|
|
@@ -55558,13 +55586,13 @@ function getRawParserOptionsMap(parser) {
|
|
|
55558
55586
|
return Object.fromEntries(Object.entries(parser).map(([k, v])=>[
|
|
55559
55587
|
k,
|
|
55560
55588
|
getRawParserOptions(v, k)
|
|
55561
|
-
]).filter(([
|
|
55589
|
+
]).filter(([_, v])=>void 0 !== v));
|
|
55562
55590
|
}
|
|
55563
55591
|
function getRawGeneratorOptionsMap(generator) {
|
|
55564
55592
|
return Object.fromEntries(Object.entries(generator).map(([k, v])=>[
|
|
55565
55593
|
k,
|
|
55566
55594
|
getRawGeneratorOptions(v, k)
|
|
55567
|
-
]).filter(([
|
|
55595
|
+
]).filter(([_, v])=>void 0 !== v));
|
|
55568
55596
|
}
|
|
55569
55597
|
function getRawParserOptions(parser, type) {
|
|
55570
55598
|
if ("asset" === type) return {
|
|
@@ -58076,7 +58104,10 @@ const applyRspackOptionsDefaults = (options)=>{
|
|
|
58076
58104
|
F(options, "devtool", ()=>development ? "eval" : false);
|
|
58077
58105
|
D(options, "watch", false);
|
|
58078
58106
|
D(options, "profile", false);
|
|
58079
|
-
D(options, "lazyCompilation",
|
|
58107
|
+
D(options, "lazyCompilation", {
|
|
58108
|
+
imports: true,
|
|
58109
|
+
entries: false
|
|
58110
|
+
});
|
|
58080
58111
|
D(options, "bail", false);
|
|
58081
58112
|
F(options, "cache", ()=>development);
|
|
58082
58113
|
if (false === options.cache) options.experiments.cache = false;
|
|
@@ -58107,9 +58138,7 @@ const applyRspackOptionsDefaults = (options)=>{
|
|
|
58107
58138
|
targetProperties,
|
|
58108
58139
|
isAffectedByBrowserslist: void 0 === target || "string" == typeof target && target.startsWith("browserslist") || Array.isArray(target) && target.some((target)=>target.startsWith("browserslist")),
|
|
58109
58140
|
outputModule: options.experiments.outputModule,
|
|
58110
|
-
|
|
58111
|
-
entry: options.entry,
|
|
58112
|
-
futureDefaults: options.experiments.futureDefaults
|
|
58141
|
+
entry: options.entry
|
|
58113
58142
|
});
|
|
58114
58143
|
applybundlerInfoDefaults(options.experiments.rspackFuture, options.output.library);
|
|
58115
58144
|
applyExternalsPresetsDefaults(options.externalsPresets, {
|
|
@@ -58191,7 +58220,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58191
58220
|
if ("object" == typeof rspackFuture) {
|
|
58192
58221
|
D(rspackFuture, "bundlerInfo", {});
|
|
58193
58222
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
58194
|
-
D(rspackFuture.bundlerInfo, "version", "1.6.8-canary-
|
|
58223
|
+
D(rspackFuture.bundlerInfo, "version", "1.6.8-canary-2fd81281-20251216180302");
|
|
58195
58224
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
58196
58225
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
58197
58226
|
}
|
|
@@ -58396,11 +58425,16 @@ const applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProp
|
|
|
58396
58425
|
type: "json"
|
|
58397
58426
|
},
|
|
58398
58427
|
type: "json"
|
|
58428
|
+
}, {
|
|
58429
|
+
with: {
|
|
58430
|
+
type: "text"
|
|
58431
|
+
},
|
|
58432
|
+
type: "asset/source"
|
|
58399
58433
|
});
|
|
58400
58434
|
return rules;
|
|
58401
58435
|
});
|
|
58402
58436
|
};
|
|
58403
|
-
const applyOutputDefaults = (output, { context, outputModule, targetProperties: tp, isAffectedByBrowserslist,
|
|
58437
|
+
const applyOutputDefaults = (output, { context, outputModule, targetProperties: tp, isAffectedByBrowserslist, entry })=>{
|
|
58404
58438
|
const getLibraryName = (library)=>{
|
|
58405
58439
|
const libraryName = "object" == typeof library && library && !Array.isArray(library) && "type" in library ? library.name : library;
|
|
58406
58440
|
if (Array.isArray(libraryName)) return libraryName.join(".");
|
|
@@ -58409,7 +58443,7 @@ const applyOutputDefaults = (output, { context, outputModule, targetProperties:
|
|
|
58409
58443
|
return "";
|
|
58410
58444
|
};
|
|
58411
58445
|
F(output, "uniqueName", ()=>{
|
|
58412
|
-
const libraryName = getLibraryName(output.library).replace(/^\[(\\*[\w:]+\\*)\](\.)|(\.)\[(\\*[\w:]+\\*)\](?=\.|$)|\[(\\*[\w:]+\\*)\]/g, (
|
|
58446
|
+
const libraryName = getLibraryName(output.library).replace(/^\[(\\*[\w:]+\\*)\](\.)|(\.)\[(\\*[\w:]+\\*)\](?=\.|$)|\[(\\*[\w:]+\\*)\]/g, (_, a, d1, d2, b, c)=>{
|
|
58413
58447
|
const content = a || b || c;
|
|
58414
58448
|
return content.startsWith("\\") && content.endsWith("\\") ? `${d2 || ""}[${content.slice(1, -1)}]${d1 || ""}` : "";
|
|
58415
58449
|
});
|
|
@@ -58877,20 +58911,24 @@ const A = (obj, prop, factory)=>{
|
|
|
58877
58911
|
};
|
|
58878
58912
|
const getPnpDefault = ()=>!!defaults_process.versions.pnp;
|
|
58879
58913
|
var normalization_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
|
|
58914
|
+
const normalizeIgnoreWarnings = (ignoreWarnings)=>{
|
|
58915
|
+
if (!ignoreWarnings) return;
|
|
58916
|
+
return ignoreWarnings.map((ignore)=>{
|
|
58917
|
+
if ("function" == typeof ignore) return ignore;
|
|
58918
|
+
const rule = ignore instanceof RegExp ? {
|
|
58919
|
+
message: ignore
|
|
58920
|
+
} : ignore;
|
|
58921
|
+
return (warning)=>{
|
|
58922
|
+
if (!rule.message && !rule.module && !rule.file) return false;
|
|
58923
|
+
if (rule.message && !rule.message.test(warning.message)) return false;
|
|
58924
|
+
if (rule.module && (!warning.module || !rule.module.test(warning.module.readableIdentifier()))) return false;
|
|
58925
|
+
if (rule.file && (!warning.file || !rule.file.test(warning.file))) return false;
|
|
58926
|
+
return true;
|
|
58927
|
+
};
|
|
58928
|
+
});
|
|
58929
|
+
};
|
|
58880
58930
|
const getNormalizedRspackOptions = (config)=>({
|
|
58881
|
-
ignoreWarnings: config.ignoreWarnings
|
|
58882
|
-
if ("function" == typeof ignore) return ignore;
|
|
58883
|
-
const i = ignore instanceof RegExp ? {
|
|
58884
|
-
message: ignore
|
|
58885
|
-
} : ignore;
|
|
58886
|
-
return (warning)=>{
|
|
58887
|
-
if (!i.message && !i.module && !i.file) return false;
|
|
58888
|
-
if (i.message && !i.message.test(warning.message)) return false;
|
|
58889
|
-
if (i.module && (!warning.module || !i.module.test(warning.module.readableIdentifier()))) return false;
|
|
58890
|
-
if (i.file && (!warning.file || !i.file.test(warning.file))) return false;
|
|
58891
|
-
return true;
|
|
58892
|
-
};
|
|
58893
|
-
}) : void 0,
|
|
58931
|
+
ignoreWarnings: normalizeIgnoreWarnings(config.ignoreWarnings),
|
|
58894
58932
|
name: config.name,
|
|
58895
58933
|
dependencies: config.dependencies,
|
|
58896
58934
|
context: config.context,
|
|
@@ -59534,7 +59572,7 @@ class ConcurrentCompilationError extends Error {
|
|
|
59534
59572
|
}
|
|
59535
59573
|
}
|
|
59536
59574
|
function rmrf(fs, p, callback) {
|
|
59537
|
-
fs.stat(p, (err, stats)=>{
|
|
59575
|
+
(fs.lstat || fs.stat)(p, (err, stats)=>{
|
|
59538
59576
|
if (err) {
|
|
59539
59577
|
if ("ENOENT" === err.code) return callback();
|
|
59540
59578
|
return callback(err);
|
|
@@ -59786,7 +59824,7 @@ class ThreadsafeIntermediateNodeFS extends ThreadsafeOutputNodeFS {
|
|
|
59786
59824
|
readFn(fd, {
|
|
59787
59825
|
position,
|
|
59788
59826
|
length
|
|
59789
|
-
}, (err,
|
|
59827
|
+
}, (err, _bytesRead, buffer)=>{
|
|
59790
59828
|
err ? resolve(err) : resolve(buffer);
|
|
59791
59829
|
});
|
|
59792
59830
|
});
|
|
@@ -60250,10 +60288,10 @@ function Resolver_class_private_field_set(receiver, privateMap, value) {
|
|
|
60250
60288
|
}
|
|
60251
60289
|
var _binding = /*#__PURE__*/ new WeakMap();
|
|
60252
60290
|
class Resolver {
|
|
60253
|
-
resolveSync(
|
|
60291
|
+
resolveSync(_context, path, request) {
|
|
60254
60292
|
return Resolver_class_private_field_get(this, _binding).resolveSync(path, request) ?? false;
|
|
60255
60293
|
}
|
|
60256
|
-
resolve(
|
|
60294
|
+
resolve(_context, path, request, resolveContext, callback) {
|
|
60257
60295
|
Resolver_class_private_field_get(this, _binding).resolve(path, request, (error, text)=>{
|
|
60258
60296
|
if (error) return void callback(error);
|
|
60259
60297
|
const req = text ? JSON.parse(text) : void 0;
|
|
@@ -61231,10 +61269,10 @@ function VirtualModulesPlugin_class_private_field_set(receiver, privateMap, valu
|
|
|
61231
61269
|
}
|
|
61232
61270
|
const VirtualModulesPlugin_PLUGIN_NAME = "VirtualModulesPlugin";
|
|
61233
61271
|
const VFILES_BY_COMPILER = new WeakMap();
|
|
61234
|
-
var _staticModules = /*#__PURE__*/ new WeakMap(),
|
|
61272
|
+
var _staticModules = /*#__PURE__*/ new WeakMap(), VirtualModulesPlugin_compiler = /*#__PURE__*/ new WeakMap(), _store = /*#__PURE__*/ new WeakMap();
|
|
61235
61273
|
class VirtualModulesPlugin {
|
|
61236
61274
|
apply(compiler) {
|
|
61237
|
-
VirtualModulesPlugin_class_private_field_set(this,
|
|
61275
|
+
VirtualModulesPlugin_class_private_field_set(this, VirtualModulesPlugin_compiler, compiler);
|
|
61238
61276
|
compiler.hooks.afterEnvironment.tap(VirtualModulesPlugin_PLUGIN_NAME, ()=>{
|
|
61239
61277
|
const record = VFILES_BY_COMPILER.get(compiler) || {};
|
|
61240
61278
|
if (VirtualModulesPlugin_class_private_field_get(this, _staticModules)) for (const [filePath, content] of Object.entries(VirtualModulesPlugin_class_private_field_get(this, _staticModules))){
|
|
@@ -61245,15 +61283,15 @@ class VirtualModulesPlugin {
|
|
|
61245
61283
|
});
|
|
61246
61284
|
}
|
|
61247
61285
|
writeModule(filePath, contents) {
|
|
61248
|
-
if (!VirtualModulesPlugin_class_private_field_get(this,
|
|
61286
|
+
if (!VirtualModulesPlugin_class_private_field_get(this, VirtualModulesPlugin_compiler)) throw new Error("Plugin has not been initialized");
|
|
61249
61287
|
const store = this.getVirtualFileStore();
|
|
61250
|
-
const fullPath = path_browserify_default().resolve(VirtualModulesPlugin_class_private_field_get(this,
|
|
61288
|
+
const fullPath = path_browserify_default().resolve(VirtualModulesPlugin_class_private_field_get(this, VirtualModulesPlugin_compiler).context, filePath);
|
|
61251
61289
|
store.writeVirtualFileSync(fullPath, contents);
|
|
61252
|
-
notifyWatchers(VirtualModulesPlugin_class_private_field_get(this,
|
|
61290
|
+
notifyWatchers(VirtualModulesPlugin_class_private_field_get(this, VirtualModulesPlugin_compiler), fullPath, Date.now());
|
|
61253
61291
|
}
|
|
61254
61292
|
getVirtualFileStore() {
|
|
61255
61293
|
if (VirtualModulesPlugin_class_private_field_get(this, _store)) return VirtualModulesPlugin_class_private_field_get(this, _store);
|
|
61256
|
-
const store = VirtualModulesPlugin_class_private_field_get(this,
|
|
61294
|
+
const store = VirtualModulesPlugin_class_private_field_get(this, VirtualModulesPlugin_compiler)?.__internal__get_virtual_file_store();
|
|
61257
61295
|
if (!store) throw new Error("Virtual file store has not been initialized");
|
|
61258
61296
|
VirtualModulesPlugin_class_private_field_set(this, _store, store);
|
|
61259
61297
|
return store;
|
|
@@ -61273,7 +61311,7 @@ class VirtualModulesPlugin {
|
|
|
61273
61311
|
writable: true,
|
|
61274
61312
|
value: void 0
|
|
61275
61313
|
});
|
|
61276
|
-
VirtualModulesPlugin_class_private_field_init(this,
|
|
61314
|
+
VirtualModulesPlugin_class_private_field_init(this, VirtualModulesPlugin_compiler, {
|
|
61277
61315
|
writable: true,
|
|
61278
61316
|
value: void 0
|
|
61279
61317
|
});
|
|
@@ -62337,7 +62375,7 @@ class MultiStats {
|
|
|
62337
62375
|
return obj;
|
|
62338
62376
|
});
|
|
62339
62377
|
if (childOptions.version) {
|
|
62340
|
-
obj.rspackVersion = "1.6.8-canary-
|
|
62378
|
+
obj.rspackVersion = "1.6.8-canary-2fd81281-20251216180302";
|
|
62341
62379
|
obj.version = "5.75.0";
|
|
62342
62380
|
}
|
|
62343
62381
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -62909,7 +62947,13 @@ function IgnoreWarningsPlugin_define_property(obj, key, value) {
|
|
|
62909
62947
|
class IgnoreWarningsPlugin {
|
|
62910
62948
|
apply(compiler) {
|
|
62911
62949
|
compiler.hooks.compilation.tap(this.name, (compilation)=>{
|
|
62912
|
-
compilation.hooks.processWarnings.tap(this.name, (warnings)=>warnings.filter((warning)
|
|
62950
|
+
compilation.hooks.processWarnings.tap(this.name, (warnings)=>warnings.filter((warning)=>{
|
|
62951
|
+
const plainWarning = warning.message ? {
|
|
62952
|
+
...warning,
|
|
62953
|
+
message: util_default().stripVTControlCharacters(warning.message)
|
|
62954
|
+
} : warning;
|
|
62955
|
+
return !this._ignorePattern.some((ignore)=>ignore(plainWarning, compilation));
|
|
62956
|
+
}));
|
|
62913
62957
|
});
|
|
62914
62958
|
}
|
|
62915
62959
|
constructor(ignorePattern){
|
|
@@ -63647,7 +63691,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
63647
63691
|
},
|
|
63648
63692
|
version: (object)=>{
|
|
63649
63693
|
object.version = "5.75.0";
|
|
63650
|
-
object.rspackVersion = "1.6.8-canary-
|
|
63694
|
+
object.rspackVersion = "1.6.8-canary-2fd81281-20251216180302";
|
|
63651
63695
|
},
|
|
63652
63696
|
env: (object, _compilation, _context, { _env })=>{
|
|
63653
63697
|
object.env = _env;
|
|
@@ -63711,7 +63755,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
63711
63755
|
object.assets = limited.children;
|
|
63712
63756
|
object.filteredAssets = limited.filteredChildren;
|
|
63713
63757
|
},
|
|
63714
|
-
chunks: (object, compilation, context,
|
|
63758
|
+
chunks: (object, compilation, context, _options, factory)=>{
|
|
63715
63759
|
const { type, getStatsCompilation } = context;
|
|
63716
63760
|
const statsCompilation = getStatsCompilation(compilation);
|
|
63717
63761
|
const chunks = statsCompilation.chunks;
|
|
@@ -64338,8 +64382,8 @@ const NORMALIZER = {
|
|
|
64338
64382
|
value
|
|
64339
64383
|
] : [];
|
|
64340
64384
|
return array.map((filter)=>{
|
|
64341
|
-
if ("string" == typeof filter) return (
|
|
64342
|
-
if (filter instanceof RegExp) return (
|
|
64385
|
+
if ("string" == typeof filter) return (_warning, warningString)=>warningString.includes(filter);
|
|
64386
|
+
if (filter instanceof RegExp) return (_warning, warningString)=>filter.test(warningString);
|
|
64343
64387
|
if ("function" == typeof filter) return filter;
|
|
64344
64388
|
throw new Error(`Can only filter warnings with Strings or RegExps. (Given: ${filter})`);
|
|
64345
64389
|
});
|
|
@@ -66257,7 +66301,7 @@ class ModuleFederationPlugin {
|
|
|
66257
66301
|
}
|
|
66258
66302
|
function collectManifestExposes(exposes) {
|
|
66259
66303
|
if (!exposes) return;
|
|
66260
|
-
const parsed = parseOptions(exposes, (value
|
|
66304
|
+
const parsed = parseOptions(exposes, (value)=>({
|
|
66261
66305
|
import: Array.isArray(value) ? value : [
|
|
66262
66306
|
value
|
|
66263
66307
|
],
|
|
@@ -66784,7 +66828,7 @@ function transformSync(source, options) {
|
|
|
66784
66828
|
const _options = JSON.stringify(options || {});
|
|
66785
66829
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
66786
66830
|
}
|
|
66787
|
-
const exports_rspackVersion = "1.6.8-canary-
|
|
66831
|
+
const exports_rspackVersion = "1.6.8-canary-2fd81281-20251216180302";
|
|
66788
66832
|
const exports_version = "5.75.0";
|
|
66789
66833
|
const exports_WebpackError = Error;
|
|
66790
66834
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -67195,4 +67239,4 @@ var __webpack_exports__EntryDependency = external_rspack_wasi_browser_js_.EntryD
|
|
|
67195
67239
|
var __webpack_exports__ExternalModule = external_rspack_wasi_browser_js_.ExternalModule;
|
|
67196
67240
|
var __webpack_exports__Module = external_rspack_wasi_browser_js_.Module;
|
|
67197
67241
|
var __webpack_exports__NormalModule = external_rspack_wasi_browser_js_.NormalModule;
|
|
67198
|
-
export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefinePlugin, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, lib_EntryOptionPlugin as EntryOptionPlugin, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, DefaultRuntimeGlobals as RuntimeGlobals, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, statsFactoryUtils_StatsErrorCode as StatsErrorCode, SwcJsMinimizerRspackPlugin, Template, ValidationError, WarnCaseSensitiveModulesPlugin, exports_WebpackError as WebpackError, RspackOptionsApply as WebpackOptionsApply, builtinMemFs, exports_config as config, container, electron, exports_experiments as experiments, javascript, exports_library as library, exports_node as node, optimize, src_rspack_0 as rspack, exports_rspackVersion as rspackVersion, sharing, sources, exports_util as util, exports_version as version, exports_wasm as wasm, web, webworker, __webpack_exports__AsyncDependenciesBlock as AsyncDependenciesBlock, __webpack_exports__ConcatenatedModule as ConcatenatedModule, __webpack_exports__ContextModule as ContextModule, __webpack_exports__Dependency as Dependency, __webpack_exports__EntryDependency as EntryDependency, __webpack_exports__ExternalModule as ExternalModule, __webpack_exports__Module as Module, __webpack_exports__NormalModule as NormalModule };
|
|
67242
|
+
export { BannerPlugin, BrowserHttpImportEsmPlugin, BrowserRequirePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefinePlugin, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, lib_EntryOptionPlugin as EntryOptionPlugin, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, DefaultRuntimeGlobals as RuntimeGlobals, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, statsFactoryUtils_StatsErrorCode as StatsErrorCode, SwcJsMinimizerRspackPlugin, Template, ValidationError, WarnCaseSensitiveModulesPlugin, exports_WebpackError as WebpackError, RspackOptionsApply as WebpackOptionsApply, builtinMemFs, exports_config as config, container, electron, exports_experiments as experiments, javascript, lazyCompilationMiddleware, exports_library as library, exports_node as node, optimize, src_rspack_0 as rspack, exports_rspackVersion as rspackVersion, sharing, sources, exports_util as util, exports_version as version, exports_wasm as wasm, web, webworker, __webpack_exports__AsyncDependenciesBlock as AsyncDependenciesBlock, __webpack_exports__ConcatenatedModule as ConcatenatedModule, __webpack_exports__ContextModule as ContextModule, __webpack_exports__Dependency as Dependency, __webpack_exports__EntryDependency as EntryDependency, __webpack_exports__ExternalModule as ExternalModule, __webpack_exports__Module as Module, __webpack_exports__NormalModule as NormalModule };
|
|
@@ -28,6 +28,6 @@ export declare class EntryOptionPlugin {
|
|
|
28
28
|
* @param desc entry description
|
|
29
29
|
* @returns options for the entry
|
|
30
30
|
*/
|
|
31
|
-
static entryDescriptionToOptions(
|
|
31
|
+
static entryDescriptionToOptions(_compiler: Compiler, name: string, desc: EntryDescriptionNormalized): EntryOptions;
|
|
32
32
|
}
|
|
33
33
|
export default EntryOptionPlugin;
|
|
Binary file
|
package/dist/util/fake.d.ts
CHANGED
|
@@ -3,7 +3,12 @@ export type FakeHook<T> = T & {
|
|
|
3
3
|
};
|
|
4
4
|
export declare function createFakeCompilationDependencies(getDeps: () => string[], addDeps: (deps: string[]) => void): {
|
|
5
5
|
[Symbol.iterator](): Generator<string, void, unknown>;
|
|
6
|
-
has(dep: string)
|
|
6
|
+
has: (dep: string) => boolean;
|
|
7
7
|
add: (dep: string) => void;
|
|
8
8
|
addAll: (deps: Iterable<string>) => void;
|
|
9
|
+
delete: (dep: string) => boolean;
|
|
10
|
+
keys(): SetIterator<string>;
|
|
11
|
+
values(): SetIterator<string>;
|
|
12
|
+
entries(): SetIterator<[string, string]>;
|
|
13
|
+
readonly size: number;
|
|
9
14
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/browser",
|
|
3
|
-
"version": "1.6.8-canary-
|
|
3
|
+
"version": "1.6.8-canary-2fd81281-20251216180302",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Rspack for running in the browser. This is still in early stage and may not follow the semver.",
|