@rspack-canary/core 1.6.6-canary-5795e26c-20251126174205 → 1.6.6-canary-310775e8-20251127083855
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/target.d.ts +2 -0
- package/dist/config/types.d.ts +11 -2
- package/dist/index.js +43 -6
- package/package.json +2 -2
package/dist/config/target.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ export type EcmaTargetProperties = {
|
|
|
50
50
|
bigIntLiteral: boolean | null;
|
|
51
51
|
/** const and let variable declarations are available */
|
|
52
52
|
const: boolean | null;
|
|
53
|
+
/** method shorthand in object is available */
|
|
54
|
+
methodShorthand: boolean | null;
|
|
53
55
|
/** arrow functions are available */
|
|
54
56
|
arrowFunction: boolean | null;
|
|
55
57
|
/** for of iteration is available */
|
package/dist/config/types.d.ts
CHANGED
|
@@ -256,6 +256,8 @@ export type DevtoolModuleFilenameTemplate = string | ((context: ModuleFilenameTe
|
|
|
256
256
|
export type DevtoolFallbackModuleFilenameTemplate = DevtoolModuleFilenameTemplate;
|
|
257
257
|
/** Tell Rspack what kind of ES-features may be used in the generated runtime-code. */
|
|
258
258
|
export type Environment = {
|
|
259
|
+
/** The environment supports { fn() {} } */
|
|
260
|
+
methodShorthand?: boolean;
|
|
259
261
|
/** The environment supports arrow functions ('() => { ... }'). */
|
|
260
262
|
arrowFunction?: boolean;
|
|
261
263
|
/** The environment supports async function and await ('async function () { await ... }'). */
|
|
@@ -295,8 +297,15 @@ export type Output = {
|
|
|
295
297
|
* */
|
|
296
298
|
path?: Path;
|
|
297
299
|
/**
|
|
298
|
-
*
|
|
299
|
-
*
|
|
300
|
+
* Controls whether Rspack adds module-related comments to the generated bundle.
|
|
301
|
+
* These comments are useful for debugging, inspecting build output, and understanding
|
|
302
|
+
* tree-shaking behavior.
|
|
303
|
+
* - `true`: Enables basic comments, including module path information.
|
|
304
|
+
* - `false`: Disables all comments, which is the default behavior.
|
|
305
|
+
* - `'verbose'`: Outputs detailed comments, such as module exports, runtime details,
|
|
306
|
+
* tree-shaking information, and bailout reasons. This mode is helpful when diagnosing
|
|
307
|
+
* build issues or performing in-depth bundle analysis.
|
|
308
|
+
* @default false
|
|
300
309
|
*/
|
|
301
310
|
pathinfo?: Pathinfo;
|
|
302
311
|
/**
|
package/dist/index.js
CHANGED
|
@@ -5173,6 +5173,35 @@ Plugins which provide custom chunk loading types must call EnableChunkLoadingPlu
|
|
|
5173
5173
|
0
|
|
5174
5174
|
]
|
|
5175
5175
|
}),
|
|
5176
|
+
methodShorthand: rawChecker({
|
|
5177
|
+
chrome: 47,
|
|
5178
|
+
and_chr: 47,
|
|
5179
|
+
edge: 12,
|
|
5180
|
+
firefox: 34,
|
|
5181
|
+
and_ff: 34,
|
|
5182
|
+
opera: 34,
|
|
5183
|
+
op_mob: 34,
|
|
5184
|
+
safari: 9,
|
|
5185
|
+
ios_saf: 9,
|
|
5186
|
+
samsung: 5,
|
|
5187
|
+
android: 47,
|
|
5188
|
+
and_qq: [
|
|
5189
|
+
14,
|
|
5190
|
+
9
|
|
5191
|
+
],
|
|
5192
|
+
and_uc: [
|
|
5193
|
+
15,
|
|
5194
|
+
5
|
|
5195
|
+
],
|
|
5196
|
+
kaios: [
|
|
5197
|
+
2,
|
|
5198
|
+
5
|
|
5199
|
+
],
|
|
5200
|
+
node: [
|
|
5201
|
+
4,
|
|
5202
|
+
9
|
|
5203
|
+
]
|
|
5204
|
+
}),
|
|
5176
5205
|
arrowFunction: rawChecker({
|
|
5177
5206
|
chrome: 45,
|
|
5178
5207
|
and_chr: 45,
|
|
@@ -5561,6 +5590,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5561
5590
|
const: v(6),
|
|
5562
5591
|
templateLiteral: v(4),
|
|
5563
5592
|
optionalChaining: v(14),
|
|
5593
|
+
methodShorthand: v(4),
|
|
5564
5594
|
arrowFunction: v(6),
|
|
5565
5595
|
asyncFunction: v(7, 6),
|
|
5566
5596
|
forOf: v(5),
|
|
@@ -5600,6 +5630,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5600
5630
|
const: v(1, 1),
|
|
5601
5631
|
templateLiteral: v(1, 1),
|
|
5602
5632
|
optionalChaining: v(8),
|
|
5633
|
+
methodShorthand: v(1, 1),
|
|
5603
5634
|
arrowFunction: v(1, 1),
|
|
5604
5635
|
asyncFunction: v(1, 7),
|
|
5605
5636
|
forOf: v(0, 36),
|
|
@@ -5635,6 +5666,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5635
5666
|
const: v(0, 15),
|
|
5636
5667
|
templateLiteral: v(0, 13),
|
|
5637
5668
|
optionalChaining: v(0, 44),
|
|
5669
|
+
methodShorthand: v(0, 15),
|
|
5638
5670
|
arrowFunction: v(0, 15),
|
|
5639
5671
|
asyncFunction: v(0, 21),
|
|
5640
5672
|
forOf: v(0, 13),
|
|
@@ -5656,6 +5688,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5656
5688
|
const: v >= 2015,
|
|
5657
5689
|
templateLiteral: v >= 2015,
|
|
5658
5690
|
optionalChaining: v >= 2020,
|
|
5691
|
+
methodShorthand: v >= 2015,
|
|
5659
5692
|
arrowFunction: v >= 2015,
|
|
5660
5693
|
forOf: v >= 2015,
|
|
5661
5694
|
destructuring: v >= 2015,
|
|
@@ -5752,7 +5785,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5752
5785
|
}, applyExperimentsDefaults = (experiments, { development })=>{
|
|
5753
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);
|
|
5754
5787
|
}, applybundlerInfoDefaults = (rspackFuture, library)=>{
|
|
5755
|
-
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.6-canary-
|
|
5788
|
+
"object" == typeof rspackFuture && (D(rspackFuture, "bundlerInfo", {}), "object" == typeof rspackFuture.bundlerInfo && (D(rspackFuture.bundlerInfo, "version", "1.6.6-canary-310775e8-20251127083855"), D(rspackFuture.bundlerInfo, "bundler", "rspack"), D(rspackFuture.bundlerInfo, "force", !library)));
|
|
5756
5789
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyModuleDefaults = (module1, { cache, asyncWebAssembly, css, targetProperties, mode, uniqueName, usedExports, inlineConst, deferImport })=>{
|
|
5757
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 })=>{
|
|
5758
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", [
|
|
@@ -5909,6 +5942,9 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5909
5942
|
}), F(environment, "const", ()=>{
|
|
5910
5943
|
let v;
|
|
5911
5944
|
return tp && ((v = tp.const) || void 0 === v);
|
|
5945
|
+
}), F(environment, "methodShorthand", ()=>{
|
|
5946
|
+
let v;
|
|
5947
|
+
return tp && ((v = tp.methodShorthand) || void 0 === v);
|
|
5912
5948
|
}), F(environment, "arrowFunction", ()=>{
|
|
5913
5949
|
let v;
|
|
5914
5950
|
return tp && ((v = tp.arrowFunction) || void 0 === v);
|
|
@@ -5948,7 +5984,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
5948
5984
|
return "function" != typeof chunkFilename ? chunkFilename.replace(/\.[mc]?js(\?|$)/, ".css$1") : "[id].css";
|
|
5949
5985
|
}), D(output, "hotUpdateChunkFilename", `[id].[fullhash].hot-update.${output.module ? "mjs" : "js"}`), F(output, "hotUpdateMainFilename", ()=>`[runtime].[fullhash].hot-update.${output.module ? "json.mjs" : "json"}`);
|
|
5950
5986
|
let uniqueNameId = Template.toIdentifier(output.uniqueName);
|
|
5951
|
-
F(output, "hotUpdateGlobal", ()=>`webpackHotUpdate${uniqueNameId}`), F(output, "chunkLoadingGlobal", ()=>`webpackChunk${uniqueNameId}`), D(output, "assetModuleFilename", "[hash][ext][query]"), D(output, "webassemblyModuleFilename", "[hash].module.wasm"), D(output, "compareBeforeEmit", !0), F(output, "path", ()=>external_node_path_default().join(process.cwd(), "dist")), F(output, "pathinfo", ()
|
|
5987
|
+
F(output, "hotUpdateGlobal", ()=>`webpackHotUpdate${uniqueNameId}`), F(output, "chunkLoadingGlobal", ()=>`webpackChunk${uniqueNameId}`), D(output, "assetModuleFilename", "[hash][ext][query]"), D(output, "webassemblyModuleFilename", "[hash].module.wasm"), D(output, "compareBeforeEmit", !0), F(output, "path", ()=>external_node_path_default().join(process.cwd(), "dist")), F(output, "pathinfo", ()=>!1), D(output, "publicPath", tp && (tp.document || tp.importScripts) ? "auto" : ""), D(output, "hashFunction", "xxhash64"), D(output, "hashDigest", "hex"), D(output, "hashDigestLength", 16), D(output, "strictModuleErrorHandling", !1), output.library && F(output.library, "type", ()=>output.module ? "module" : "var"), F(output, "chunkFormat", ()=>{
|
|
5952
5988
|
if (tp) {
|
|
5953
5989
|
let helpMessage = isAffectedByBrowserslist ? "Make sure that your 'browserslist' includes only platforms that support these features or select an appropriate 'target' to allow selecting a chunk format by default. Alternatively specify the 'output.chunkFormat' directly." : "Select an appropriate 'target' to allow selecting one by default, or specify the 'output.chunkFormat' directly.";
|
|
5954
5990
|
if (output.module) {
|
|
@@ -7402,7 +7438,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
7402
7438
|
});
|
|
7403
7439
|
}
|
|
7404
7440
|
}
|
|
7405
|
-
let CORE_VERSION = "1.6.6-canary-
|
|
7441
|
+
let CORE_VERSION = "1.6.6-canary-310775e8-20251127083855", bindingVersionCheck_errorMessage = (coreVersion, expectedCoreVersion)=>process.env.RSPACK_BINDING ? `Unmatched version @rspack/core@${coreVersion} and binding version.
|
|
7406
7442
|
|
|
7407
7443
|
Help:
|
|
7408
7444
|
Looks like you are using a custom binding (via environment variable 'RSPACK_BINDING=${process.env.RSPACK_BINDING}').
|
|
@@ -7994,6 +8030,7 @@ Help:
|
|
|
7994
8030
|
environment: function(environment = {}) {
|
|
7995
8031
|
return {
|
|
7996
8032
|
const: !!environment.const,
|
|
8033
|
+
methodShorthand: !!environment.methodShorthand,
|
|
7997
8034
|
arrowFunction: !!environment.arrowFunction,
|
|
7998
8035
|
nodePrefixForCoreModules: !!environment.nodePrefixForCoreModules,
|
|
7999
8036
|
asyncFunction: !!environment.asyncFunction,
|
|
@@ -8702,7 +8739,7 @@ Help:
|
|
|
8702
8739
|
obj.children = this.stats.map((stat, idx)=>{
|
|
8703
8740
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
8704
8741
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
8705
|
-
}), childOptions.version && (obj.rspackVersion = "1.6.6-canary-
|
|
8742
|
+
}), childOptions.version && (obj.rspackVersion = "1.6.6-canary-310775e8-20251127083855", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(""));
|
|
8706
8743
|
let mapError = (j, obj)=>({
|
|
8707
8744
|
...obj,
|
|
8708
8745
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -9601,7 +9638,7 @@ Help:
|
|
|
9601
9638
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
9602
9639
|
},
|
|
9603
9640
|
version: (object)=>{
|
|
9604
|
-
object.version = "5.75.0", object.rspackVersion = "1.6.6-canary-
|
|
9641
|
+
object.version = "5.75.0", object.rspackVersion = "1.6.6-canary-310775e8-20251127083855";
|
|
9605
9642
|
},
|
|
9606
9643
|
env: (object, _compilation, _context, { _env })=>{
|
|
9607
9644
|
object.env = _env;
|
|
@@ -11820,7 +11857,7 @@ Help:
|
|
|
11820
11857
|
let _options = JSON.stringify(options || {});
|
|
11821
11858
|
return binding_default().transform(source, _options);
|
|
11822
11859
|
}
|
|
11823
|
-
let exports_rspackVersion = "1.6.6-canary-
|
|
11860
|
+
let exports_rspackVersion = "1.6.6-canary-310775e8-20251127083855", exports_version = "5.75.0", exports_WebpackError = Error, sources = __webpack_require__("webpack-sources"), exports_config = {
|
|
11824
11861
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
11825
11862
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
11826
11863
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack-canary/core",
|
|
3
|
-
"version": "1.6.6-canary-
|
|
3
|
+
"version": "1.6.6-canary-310775e8-20251127083855",
|
|
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.6-canary-
|
|
61
|
+
"@rspack/binding": "npm:@rspack-canary/binding@1.6.6-canary-310775e8-20251127083855"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"@swc/helpers": ">=0.5.1"
|