@rspack-canary/browser 1.6.1-canary-d808219f-20251101173657 → 1.6.1-canary-46a54daf-20251103113814
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/config/devServer.d.ts +0 -1
- package/dist/index.mjs +33 -27
- package/dist/napi-binding.d.ts +0 -6
- package/dist/rspack.wasm32-wasi.wasm +0 -0
- package/package.json +1 -1
|
@@ -33,7 +33,6 @@ type Headers = {
|
|
|
33
33
|
value: string;
|
|
34
34
|
}[] | Record<string, string | string[]>;
|
|
35
35
|
type OutputFileSystem = import("..").OutputFileSystem & {
|
|
36
|
-
createReadStream?: typeof import("fs").createReadStream;
|
|
37
36
|
statSync: import("fs").StatSyncFn;
|
|
38
37
|
readFileSync: typeof import("fs").readFileSync;
|
|
39
38
|
};
|
package/dist/index.mjs
CHANGED
|
@@ -53396,16 +53396,16 @@ function applyLimits(options, logger) {
|
|
|
53396
53396
|
}
|
|
53397
53397
|
if (void 0 === options.output.chunkLoading) options.output.chunkLoading = "import";
|
|
53398
53398
|
if (options.output.library) options.output.library = void 0;
|
|
53399
|
-
|
|
53400
|
-
if (splitChunks) {
|
|
53399
|
+
let { splitChunks } = options.optimization;
|
|
53400
|
+
if (void 0 === splitChunks) splitChunks = options.optimization.splitChunks = {};
|
|
53401
|
+
if (false !== splitChunks) {
|
|
53401
53402
|
splitChunks.chunks = "all";
|
|
53402
53403
|
splitChunks.minSize = 0;
|
|
53403
53404
|
splitChunks.maxAsyncRequests = 1 / 0;
|
|
53404
53405
|
splitChunks.maxInitialRequests = 1 / 0;
|
|
53405
|
-
|
|
53406
|
-
|
|
53407
|
-
|
|
53408
|
-
}
|
|
53406
|
+
splitChunks.cacheGroups ??= {};
|
|
53407
|
+
splitChunks.cacheGroups.default = false;
|
|
53408
|
+
splitChunks.cacheGroups.defaultVendors = false;
|
|
53409
53409
|
}
|
|
53410
53410
|
}
|
|
53411
53411
|
class EsmLibraryPlugin {
|
|
@@ -58126,7 +58126,7 @@ const applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
|
58126
58126
|
if ("object" == typeof rspackFuture) {
|
|
58127
58127
|
D(rspackFuture, "bundlerInfo", {});
|
|
58128
58128
|
if ("object" == typeof rspackFuture.bundlerInfo) {
|
|
58129
|
-
D(rspackFuture.bundlerInfo, "version", "1.6.1-canary-
|
|
58129
|
+
D(rspackFuture.bundlerInfo, "version", "1.6.1-canary-46a54daf-20251103113814");
|
|
58130
58130
|
D(rspackFuture.bundlerInfo, "bundler", "rspack");
|
|
58131
58131
|
D(rspackFuture.bundlerInfo, "force", !library);
|
|
58132
58132
|
}
|
|
@@ -59670,7 +59670,7 @@ class MergedEtag {
|
|
|
59670
59670
|
}
|
|
59671
59671
|
const dualObjectMap = new WeakMap();
|
|
59672
59672
|
const objectStringMap = new WeakMap();
|
|
59673
|
-
const
|
|
59673
|
+
const mergeEtags = (first, second)=>{
|
|
59674
59674
|
let a = first;
|
|
59675
59675
|
let b = second;
|
|
59676
59676
|
if ("string" == typeof a) {
|
|
@@ -59761,9 +59761,9 @@ class ItemCacheFacade {
|
|
|
59761
59761
|
this._etag = etag;
|
|
59762
59762
|
}
|
|
59763
59763
|
}
|
|
59764
|
-
class
|
|
59764
|
+
class CacheFacade {
|
|
59765
59765
|
getChildCache(name) {
|
|
59766
|
-
return new
|
|
59766
|
+
return new CacheFacade(this._cache, `${this._name}|${name}`, this._hashFunction);
|
|
59767
59767
|
}
|
|
59768
59768
|
getItemCache(identifier, etag) {
|
|
59769
59769
|
return new ItemCacheFacade(this._cache, `${this._name}|${identifier}`, etag);
|
|
@@ -59772,7 +59772,7 @@ class CacheFacade_CacheFacade {
|
|
|
59772
59772
|
return getLazyHashedEtag_getter(obj, this._hashFunction);
|
|
59773
59773
|
}
|
|
59774
59774
|
mergeEtags(a, b) {
|
|
59775
|
-
return
|
|
59775
|
+
return mergeEtags(a, b);
|
|
59776
59776
|
}
|
|
59777
59777
|
get(identifier, etag, callback) {
|
|
59778
59778
|
this._cache.get(`${this._name}|${identifier}`, etag, callback);
|
|
@@ -59825,7 +59825,7 @@ class CacheFacade_CacheFacade {
|
|
|
59825
59825
|
this._hashFunction = hashFunction;
|
|
59826
59826
|
}
|
|
59827
59827
|
}
|
|
59828
|
-
const
|
|
59828
|
+
const lib_CacheFacade = CacheFacade;
|
|
59829
59829
|
function NormalModuleFactory_define_property(obj, key, value) {
|
|
59830
59830
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
59831
59831
|
value: value,
|
|
@@ -60528,7 +60528,9 @@ const createCompilerHooksRegisters = (getCompiler, createTap)=>({
|
|
|
60528
60528
|
targetPath,
|
|
60529
60529
|
outputPath,
|
|
60530
60530
|
get source () {
|
|
60531
|
-
|
|
60531
|
+
const source = getCompiler().__internal__get_compilation().getAsset(filename)?.source;
|
|
60532
|
+
if (!source) throw new Error(`Asset ${filename} not found`);
|
|
60533
|
+
return source;
|
|
60532
60534
|
},
|
|
60533
60535
|
get content () {
|
|
60534
60536
|
return this.source?.buffer();
|
|
@@ -61431,7 +61433,7 @@ class Compiler {
|
|
|
61431
61433
|
return Compiler_class_private_field_get(this, _ruleSet);
|
|
61432
61434
|
}
|
|
61433
61435
|
getCache(name) {
|
|
61434
|
-
return new
|
|
61436
|
+
return new lib_CacheFacade(this.cache, `${this.compilerPath}${name}`, this.options.output.hashFunction);
|
|
61435
61437
|
}
|
|
61436
61438
|
getInfrastructureLogger(name) {
|
|
61437
61439
|
if (!name) throw new TypeError("Compiler.getInfrastructureLogger(name) called without a name");
|
|
@@ -61843,8 +61845,8 @@ class Compiler {
|
|
|
61843
61845
|
]),
|
|
61844
61846
|
additionalPass: new AsyncSeriesHook([])
|
|
61845
61847
|
};
|
|
61846
|
-
this.webpack =
|
|
61847
|
-
this.rspack =
|
|
61848
|
+
this.webpack = src_rspack_0;
|
|
61849
|
+
this.rspack = src_rspack_0;
|
|
61848
61850
|
this.root = this;
|
|
61849
61851
|
this.outputPath = "";
|
|
61850
61852
|
this.inputFileSystem = null;
|
|
@@ -62066,7 +62068,7 @@ class MultiStats {
|
|
|
62066
62068
|
return obj;
|
|
62067
62069
|
});
|
|
62068
62070
|
if (childOptions.version) {
|
|
62069
|
-
obj.rspackVersion = "1.6.1-canary-
|
|
62071
|
+
obj.rspackVersion = "1.6.1-canary-46a54daf-20251103113814";
|
|
62070
62072
|
obj.version = "5.75.0";
|
|
62071
62073
|
}
|
|
62072
62074
|
if (childOptions.hash) obj.hash = obj.children.map((j)=>j.hash).join("");
|
|
@@ -62233,7 +62235,7 @@ function ArrayQueue_define_property(obj, key, value) {
|
|
|
62233
62235
|
var ArrayQueue_computedKey;
|
|
62234
62236
|
ArrayQueue_computedKey = Symbol.iterator;
|
|
62235
62237
|
let ArrayQueue_computedKey1 = ArrayQueue_computedKey;
|
|
62236
|
-
class
|
|
62238
|
+
class ArrayQueue {
|
|
62237
62239
|
get length() {
|
|
62238
62240
|
return this._list.length + this._listReversed.length;
|
|
62239
62241
|
}
|
|
@@ -62275,7 +62277,7 @@ class ArrayQueue_ArrayQueue {
|
|
|
62275
62277
|
this._listReversed = [];
|
|
62276
62278
|
}
|
|
62277
62279
|
}
|
|
62278
|
-
const
|
|
62280
|
+
const util_ArrayQueue = ArrayQueue;
|
|
62279
62281
|
var MultiCompiler_process = __webpack_require__("../../node_modules/.pnpm/process@0.11.10/node_modules/process/browser.js");
|
|
62280
62282
|
function MultiCompiler_check_private_redeclaration(obj, privateCollection) {
|
|
62281
62283
|
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
@@ -62494,7 +62496,7 @@ function runGraph(setup, run, callback) {
|
|
|
62494
62496
|
parent.children.push(node);
|
|
62495
62497
|
}
|
|
62496
62498
|
}
|
|
62497
|
-
const queue = new
|
|
62499
|
+
const queue = new util_ArrayQueue();
|
|
62498
62500
|
for (const node of nodes)if (0 === node.parents.length) {
|
|
62499
62501
|
node.state = "queued";
|
|
62500
62502
|
queue.enqueue(node);
|
|
@@ -63371,7 +63373,7 @@ const SIMPLE_EXTRACTORS = {
|
|
|
63371
63373
|
},
|
|
63372
63374
|
version: (object)=>{
|
|
63373
63375
|
object.version = "5.75.0";
|
|
63374
|
-
object.rspackVersion = "1.6.1-canary-
|
|
63376
|
+
object.rspackVersion = "1.6.1-canary-46a54daf-20251103113814";
|
|
63375
63377
|
},
|
|
63376
63378
|
env: (object, _compilation, _context, { _env })=>{
|
|
63377
63379
|
object.env = _env;
|
|
@@ -66337,7 +66339,7 @@ function transformSync(source, options) {
|
|
|
66337
66339
|
const _options = JSON.stringify(options || {});
|
|
66338
66340
|
return external_rspack_wasi_browser_js_["default"].transformSync(source, _options);
|
|
66339
66341
|
}
|
|
66340
|
-
const exports_rspackVersion = "1.6.1-canary-
|
|
66342
|
+
const exports_rspackVersion = "1.6.1-canary-46a54daf-20251103113814";
|
|
66341
66343
|
const exports_version = "5.75.0";
|
|
66342
66344
|
const exports_WebpackError = Error;
|
|
66343
66345
|
const sources = __webpack_require__("../../node_modules/.pnpm/webpack-sources@3.3.3_patch_hash=b2a26650f08a2359d0a3cd81fa6fa272aa7441a28dd7e601792da5ed5d2b4aee/node_modules/webpack-sources/lib/index.js");
|
|
@@ -66431,6 +66433,9 @@ const ERROR_PREFIX = "Invalid Rspack configuration:";
|
|
|
66431
66433
|
const validateContext = ({ context })=>{
|
|
66432
66434
|
if (context && !(0, path_browserify.isAbsolute)(context)) throw new Error(`${ERROR_PREFIX} "context" must be an absolute path, get "${context}".`);
|
|
66433
66435
|
};
|
|
66436
|
+
const validateOutputPath = ({ output })=>{
|
|
66437
|
+
if (output?.path && !(0, path_browserify.isAbsolute)(output.path)) throw new Error(`${ERROR_PREFIX} "output.path" must be an absolute path, get "${output.path}".`);
|
|
66438
|
+
};
|
|
66434
66439
|
const validateSplitChunks = ({ optimization })=>{
|
|
66435
66440
|
if (optimization?.splitChunks) {
|
|
66436
66441
|
const { minChunks } = optimization.splitChunks;
|
|
@@ -66460,6 +66465,7 @@ const validateExternalUmd = ({ output, externals, externalsType })=>{
|
|
|
66460
66465
|
};
|
|
66461
66466
|
function validateRspackConfig(config) {
|
|
66462
66467
|
validateContext(config);
|
|
66468
|
+
validateOutputPath(config);
|
|
66463
66469
|
validateSplitChunks(config);
|
|
66464
66470
|
validateExternalUmd(config);
|
|
66465
66471
|
}
|
|
@@ -66492,7 +66498,7 @@ function createCompiler(userOptions) {
|
|
|
66492
66498
|
function isMultiRspackOptions(o) {
|
|
66493
66499
|
return Array.isArray(o);
|
|
66494
66500
|
}
|
|
66495
|
-
function
|
|
66501
|
+
function rspack(options, callback) {
|
|
66496
66502
|
try {
|
|
66497
66503
|
if (isMultiRspackOptions(options)) for (const option of options)validateRspackConfig(option);
|
|
66498
66504
|
else validateRspackConfig(options);
|
|
@@ -66542,11 +66548,11 @@ function rspack_rspack(options, callback) {
|
|
|
66542
66548
|
return compiler;
|
|
66543
66549
|
}
|
|
66544
66550
|
}
|
|
66545
|
-
const src_fn = Object.assign(
|
|
66551
|
+
const src_fn = Object.assign(rspack, exports_namespaceObject);
|
|
66546
66552
|
src_fn.rspack = src_fn;
|
|
66547
66553
|
src_fn.webpack = src_fn;
|
|
66548
|
-
const
|
|
66549
|
-
const src_0 =
|
|
66554
|
+
const src_rspack_0 = src_fn;
|
|
66555
|
+
const src_0 = src_rspack_0;
|
|
66550
66556
|
function BrowserHttpImportEsmPlugin_define_property(obj, key, value) {
|
|
66551
66557
|
if (key in obj) Object.defineProperty(obj, key, {
|
|
66552
66558
|
value: value,
|
|
@@ -66744,4 +66750,4 @@ var __webpack_exports__EntryDependency = external_rspack_wasi_browser_js_.EntryD
|
|
|
66744
66750
|
var __webpack_exports__ExternalModule = external_rspack_wasi_browser_js_.ExternalModule;
|
|
66745
66751
|
var __webpack_exports__Module = external_rspack_wasi_browser_js_.Module;
|
|
66746
66752
|
var __webpack_exports__NormalModule = external_rspack_wasi_browser_js_.NormalModule;
|
|
66747
|
-
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, 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,
|
|
66753
|
+
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, 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 };
|
package/dist/napi-binding.d.ts
CHANGED
|
@@ -2732,12 +2732,6 @@ export interface RawRslibPluginOptions {
|
|
|
2732
2732
|
* @default `false`
|
|
2733
2733
|
*/
|
|
2734
2734
|
interceptApiPlugin?: boolean
|
|
2735
|
-
/**
|
|
2736
|
-
* Use the compact runtime for dynamic import from `modern-module`, commonly used in CommonJS output.
|
|
2737
|
-
* This field should not be set to `true` when using `modern-module` with ESM output, as it is already in use.
|
|
2738
|
-
* @default `false`
|
|
2739
|
-
*/
|
|
2740
|
-
compactExternalModuleDynamicImport?: boolean
|
|
2741
2735
|
/**
|
|
2742
2736
|
* Add shims for javascript/esm modules
|
|
2743
2737
|
* @default `false`
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/browser",
|
|
3
|
-
"version": "1.6.1-canary-
|
|
3
|
+
"version": "1.6.1-canary-46a54daf-20251103113814",
|
|
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.",
|