@rspack/core 2.0.0-rc.0 → 2.0.0-rc.1
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/compiled/connect-next/package.json +1 -1
- package/dist/ModuleGraph.d.ts +2 -1
- package/dist/ModuleGraphConnection.d.ts +10 -0
- package/dist/builtin-plugin/HashedModuleIdsPlugin.d.ts +10 -0
- package/dist/builtin-plugin/SideEffectsFlagPlugin.d.ts +9 -9
- package/dist/builtin-plugin/index.d.ts +1 -0
- package/dist/config/adapterRuleUse.d.ts +1 -1
- package/dist/config/normalization.d.ts +2 -1
- package/dist/config/types.d.ts +14 -3
- package/dist/exports.d.ts +6 -0
- package/dist/index.js +44 -11
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"connect-next","author":"TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)","version":"4.0.
|
|
1
|
+
{"name":"connect-next","author":"TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)","version":"4.0.1","license":"MIT","types":"index.d.ts","type":"module"}
|
package/dist/ModuleGraph.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { Dependency, JsModuleGraph
|
|
1
|
+
import type { Dependency, JsModuleGraph } from '@rspack/binding';
|
|
2
2
|
import { ExportsInfo } from './ExportsInfo.js';
|
|
3
|
+
import type { ModuleGraphConnection } from './ModuleGraphConnection.js';
|
|
3
4
|
import type { Module } from './Module.js';
|
|
4
5
|
export default class ModuleGraph {
|
|
5
6
|
#private;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CIRCULAR_CONNECTION_SYMBOL, ModuleGraphConnection as BindingModuleGraphConnection, TRANSITIVE_ONLY_SYMBOL } from '@rspack/binding';
|
|
2
|
+
type ModuleGraphConnectionConstructor = typeof BindingModuleGraphConnection & {
|
|
3
|
+
readonly TRANSITIVE_ONLY: typeof TRANSITIVE_ONLY_SYMBOL;
|
|
4
|
+
readonly CIRCULAR_CONNECTION: typeof CIRCULAR_CONNECTION_SYMBOL;
|
|
5
|
+
};
|
|
6
|
+
export interface ModuleGraphConnection extends BindingModuleGraphConnection {
|
|
7
|
+
}
|
|
8
|
+
export declare const ModuleGraphConnection: ModuleGraphConnectionConstructor;
|
|
9
|
+
export type ConnectionState = boolean | typeof ModuleGraphConnection.TRANSITIVE_ONLY | typeof ModuleGraphConnection.CIRCULAR_CONNECTION;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type RawHashedModuleIdsPluginOptions } from '@rspack/binding';
|
|
2
|
+
export declare const HashedModuleIdsPlugin: {
|
|
3
|
+
new (options?: RawHashedModuleIdsPluginOptions | undefined): {
|
|
4
|
+
name: string;
|
|
5
|
+
_args: [options?: RawHashedModuleIdsPluginOptions | undefined];
|
|
6
|
+
affectedHooks: keyof import("../index.js").CompilerHooks | undefined;
|
|
7
|
+
raw(compiler: import("../index.js").Compiler): import("@rspack/binding").BuiltinPlugin;
|
|
8
|
+
apply(compiler: import("../index.js").Compiler): void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
1
|
+
import { type BuiltinPlugin, BuiltinPluginName } from '@rspack/binding';
|
|
2
|
+
import { RspackBuiltinPlugin } from './base.js';
|
|
3
|
+
export declare class SideEffectsFlagPlugin extends RspackBuiltinPlugin {
|
|
4
|
+
private analyzeSideEffectsFree;
|
|
5
|
+
name: BuiltinPluginName;
|
|
6
|
+
affectedHooks: "compilation";
|
|
7
|
+
constructor(analyzeSideEffectsFree?: boolean);
|
|
8
|
+
raw(): BuiltinPlugin;
|
|
9
|
+
}
|
|
@@ -36,6 +36,7 @@ export * from './FetchCompileAsyncWasmPlugin.js';
|
|
|
36
36
|
export * from './FileUriPlugin.js';
|
|
37
37
|
export * from './FlagDependencyExportsPlugin.js';
|
|
38
38
|
export * from './FlagDependencyUsagePlugin.js';
|
|
39
|
+
export * from './HashedModuleIdsPlugin.js';
|
|
39
40
|
export * from './HotModuleReplacementPlugin.js';
|
|
40
41
|
export * from './HttpExternalsRspackPlugin.js';
|
|
41
42
|
export * from './HttpUriPlugin.js';
|
|
@@ -186,7 +186,7 @@ export interface LoaderContext<OptionsType = {}> {
|
|
|
186
186
|
*/
|
|
187
187
|
request: string;
|
|
188
188
|
/**
|
|
189
|
-
* An array of all the loaders. It is
|
|
189
|
+
* An array of all the loaders. It is writable in the pitch phase.
|
|
190
190
|
* loaders = [{request: string, path: string, query: string, module: function}]
|
|
191
191
|
*
|
|
192
192
|
* In the example:
|
|
@@ -102,6 +102,7 @@ export interface ExperimentsNormalized {
|
|
|
102
102
|
useInputFileSystem?: false | RegExp[];
|
|
103
103
|
nativeWatcher?: boolean;
|
|
104
104
|
deferImport?: boolean;
|
|
105
|
+
pureFunctions?: boolean;
|
|
105
106
|
}
|
|
106
107
|
export type IgnoreWarningsNormalized = ((warning: WebpackError, compilation: Compilation) => boolean)[];
|
|
107
108
|
export type OptimizationRuntimeChunkNormalized = false | {
|
|
@@ -137,7 +138,7 @@ export interface RspackOptionsNormalized {
|
|
|
137
138
|
incremental?: false | Incremental;
|
|
138
139
|
watch?: Watch;
|
|
139
140
|
watchOptions: WatchOptions;
|
|
140
|
-
devServer?: DevServer;
|
|
141
|
+
devServer?: false | DevServer;
|
|
141
142
|
ignoreWarnings?: IgnoreWarningsNormalized;
|
|
142
143
|
performance?: Performance;
|
|
143
144
|
amd?: Amd;
|
package/dist/config/types.d.ts
CHANGED
|
@@ -807,7 +807,6 @@ export type JavascriptParserOptions = {
|
|
|
807
807
|
dynamicImportFetchPriority?: 'low' | 'high' | 'auto';
|
|
808
808
|
/**
|
|
809
809
|
* Enable or disable evaluating import.meta. Set to 'preserve-unknown' to preserve unknown properties for runtime evaluation.
|
|
810
|
-
* @default 'preserve-unknown'
|
|
811
810
|
*/
|
|
812
811
|
importMeta?: boolean | 'preserve-unknown';
|
|
813
812
|
/**
|
|
@@ -898,6 +897,11 @@ export type JavascriptParserOptions = {
|
|
|
898
897
|
* @default false
|
|
899
898
|
*/
|
|
900
899
|
importMetaResolve?: boolean;
|
|
900
|
+
/**
|
|
901
|
+
* Flag top-level exported functions as side-effect-free for pure-function-based tree shaking.
|
|
902
|
+
* @experimental
|
|
903
|
+
*/
|
|
904
|
+
pureFunctions?: string[];
|
|
901
905
|
};
|
|
902
906
|
export type JsonParserOptions = {
|
|
903
907
|
/**
|
|
@@ -1900,8 +1904,10 @@ export type OptimizationSplitChunksOptions = {
|
|
|
1900
1904
|
export type Optimization = {
|
|
1901
1905
|
/**
|
|
1902
1906
|
* Which algorithm to use when choosing module ids.
|
|
1907
|
+
* Setting to `false` disables the built-in algorithm, allowing a custom plugin
|
|
1908
|
+
* (e.g. HashedModuleIdsPlugin) to provide module ids instead.
|
|
1903
1909
|
*/
|
|
1904
|
-
moduleIds?: 'named' | 'natural' | 'deterministic';
|
|
1910
|
+
moduleIds?: false | 'named' | 'natural' | 'deterministic' | 'hashed';
|
|
1905
1911
|
/**
|
|
1906
1912
|
* Which algorithm to use when choosing chunk ids.
|
|
1907
1913
|
*/
|
|
@@ -2199,6 +2205,11 @@ export type Experiments = {
|
|
|
2199
2205
|
* @default false
|
|
2200
2206
|
*/
|
|
2201
2207
|
deferImport?: boolean;
|
|
2208
|
+
/**
|
|
2209
|
+
* Enable pure-function-based side-effects analysis.
|
|
2210
|
+
* @default false
|
|
2211
|
+
*/
|
|
2212
|
+
pureFunctions?: boolean;
|
|
2202
2213
|
};
|
|
2203
2214
|
export type Watch = boolean;
|
|
2204
2215
|
/** Options for watch mode. */
|
|
@@ -2400,7 +2411,7 @@ export type RspackOptions = {
|
|
|
2400
2411
|
/**
|
|
2401
2412
|
* Configuration for the development server.
|
|
2402
2413
|
*/
|
|
2403
|
-
devServer?: DevServer;
|
|
2414
|
+
devServer?: false | DevServer;
|
|
2404
2415
|
/**
|
|
2405
2416
|
* Options for module configuration.
|
|
2406
2417
|
*/
|
package/dist/exports.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { ExternalModule } from './ExternalModule.js';
|
|
|
16
16
|
export type { ResolveData, ResourceDataWithData } from './Module.js';
|
|
17
17
|
export { Module } from './Module.js';
|
|
18
18
|
export type { default as ModuleGraph } from './ModuleGraph.js';
|
|
19
|
+
export { ModuleGraphConnection, type ConnectionState, } from './ModuleGraphConnection.js';
|
|
19
20
|
export { MultiStats } from './MultiStats.js';
|
|
20
21
|
export { NormalModule } from './NormalModule.js';
|
|
21
22
|
export type { NormalModuleFactory } from './NormalModuleFactory.js';
|
|
@@ -76,6 +77,11 @@ interface Electron {
|
|
|
76
77
|
ElectronTargetPlugin: typeof ElectronTargetPlugin;
|
|
77
78
|
}
|
|
78
79
|
export declare const electron: Electron;
|
|
80
|
+
import { HashedModuleIdsPlugin } from './builtin-plugin/index.js';
|
|
81
|
+
interface Ids {
|
|
82
|
+
HashedModuleIdsPlugin: typeof HashedModuleIdsPlugin;
|
|
83
|
+
}
|
|
84
|
+
export declare const ids: Ids;
|
|
79
85
|
import { EnableLibraryPlugin } from './builtin-plugin/index.js';
|
|
80
86
|
interface Library {
|
|
81
87
|
EnableLibraryPlugin: typeof EnableLibraryPlugin;
|
package/dist/index.js
CHANGED
|
@@ -281,6 +281,7 @@ __webpack_require__.r(exports_namespaceObject), __webpack_require__.d(exports_na
|
|
|
281
281
|
LoaderTargetPlugin: ()=>LoaderTargetPlugin,
|
|
282
282
|
Module: ()=>binding_namespaceObject.Module,
|
|
283
283
|
ModuleFilenameHelpers: ()=>ModuleFilenameHelpers_namespaceObject,
|
|
284
|
+
ModuleGraphConnection: ()=>ModuleGraphConnection,
|
|
284
285
|
MultiCompiler: ()=>MultiCompiler,
|
|
285
286
|
MultiStats: ()=>MultiStats,
|
|
286
287
|
NoEmitOnErrorsPlugin: ()=>NoEmitOnErrorsPlugin,
|
|
@@ -305,6 +306,7 @@ __webpack_require__.r(exports_namespaceObject), __webpack_require__.d(exports_na
|
|
|
305
306
|
container: ()=>container,
|
|
306
307
|
electron: ()=>electron,
|
|
307
308
|
experiments: ()=>exports_experiments,
|
|
309
|
+
ids: ()=>exports_ids,
|
|
308
310
|
javascript: ()=>javascript,
|
|
309
311
|
lazyCompilationMiddleware: ()=>lazyCompilationMiddleware,
|
|
310
312
|
library: ()=>exports_library,
|
|
@@ -2458,7 +2460,7 @@ let INTERNAL_PLUGIN_NAMES = Object.keys(binding_default().BuiltinPluginName), AP
|
|
|
2458
2460
|
}), BundlerInfoRspackPlugin = base_create(binding_namespaceObject.BuiltinPluginName.BundlerInfoRspackPlugin, (options)=>({
|
|
2459
2461
|
version: options.version || 'unknown',
|
|
2460
2462
|
bundler: options.bundler || 'rspack',
|
|
2461
|
-
force: options.force ?? !
|
|
2463
|
+
force: options.force ?? !1
|
|
2462
2464
|
})), CaseSensitivePlugin = base_create(binding_namespaceObject.BuiltinPluginName.CaseSensitivePlugin, ()=>{}, 'compilation'), ChunkPrefetchPreloadPlugin = base_create(binding_namespaceObject.BuiltinPluginName.ChunkPrefetchPreloadPlugin, ()=>{});
|
|
2463
2465
|
class CircularDependencyRspackPlugin extends RspackBuiltinPlugin {
|
|
2464
2466
|
name = binding_namespaceObject.BuiltinPluginName.CircularDependencyRspackPlugin;
|
|
@@ -4468,7 +4470,8 @@ function getRawJavascriptParserOptions(parser) {
|
|
|
4468
4470
|
typeReexportsPresence: parser.typeReexportsPresence,
|
|
4469
4471
|
jsx: parser.jsx,
|
|
4470
4472
|
deferImport: parser.deferImport,
|
|
4471
|
-
importMetaResolve: parser.importMetaResolve
|
|
4473
|
+
importMetaResolve: parser.importMetaResolve,
|
|
4474
|
+
pureFunctions: parser.pureFunctions
|
|
4472
4475
|
};
|
|
4473
4476
|
}
|
|
4474
4477
|
function getRawCssParserOptions(parser) {
|
|
@@ -4666,6 +4669,9 @@ class FlagDependencyUsagePlugin extends RspackBuiltinPlugin {
|
|
|
4666
4669
|
return createBuiltinPlugin(this.name, this.global);
|
|
4667
4670
|
}
|
|
4668
4671
|
}
|
|
4672
|
+
let HashedModuleIdsPlugin = base_create(binding_namespaceObject.BuiltinPluginName.HashedModuleIdsPlugin, (options)=>({
|
|
4673
|
+
...options
|
|
4674
|
+
}), 'compilation');
|
|
4669
4675
|
class HotModuleReplacementPlugin extends RspackBuiltinPlugin {
|
|
4670
4676
|
name = binding_namespaceObject.BuiltinPluginName.HotModuleReplacementPlugin;
|
|
4671
4677
|
raw(compiler) {
|
|
@@ -5176,7 +5182,18 @@ class RscServerPlugin extends RspackBuiltinPlugin {
|
|
|
5176
5182
|
});
|
|
5177
5183
|
}
|
|
5178
5184
|
}
|
|
5179
|
-
|
|
5185
|
+
class SideEffectsFlagPlugin extends RspackBuiltinPlugin {
|
|
5186
|
+
analyzeSideEffectsFree;
|
|
5187
|
+
name = binding_namespaceObject.BuiltinPluginName.SideEffectsFlagPlugin;
|
|
5188
|
+
affectedHooks = 'compilation';
|
|
5189
|
+
constructor(analyzeSideEffectsFree = !1){
|
|
5190
|
+
super(), this.analyzeSideEffectsFree = analyzeSideEffectsFree;
|
|
5191
|
+
}
|
|
5192
|
+
raw() {
|
|
5193
|
+
return createBuiltinPlugin(this.name, this.analyzeSideEffectsFree);
|
|
5194
|
+
}
|
|
5195
|
+
}
|
|
5196
|
+
let SizeLimitsPlugin = base_create(binding_namespaceObject.BuiltinPluginName.SizeLimitsPlugin, (options)=>{
|
|
5180
5197
|
let hints = !1 === options.hints ? void 0 : options.hints;
|
|
5181
5198
|
return {
|
|
5182
5199
|
...options,
|
|
@@ -6551,7 +6568,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6551
6568
|
targets: targetProperties.targets
|
|
6552
6569
|
};
|
|
6553
6570
|
}, applyExperimentsDefaults = (experiments)=>{
|
|
6554
|
-
D(experiments, 'futureDefaults', !1), D(experiments, 'asyncWebAssembly', !0), D(experiments, 'deferImport', !1), D(experiments, 'buildHttp', void 0), experiments.buildHttp && 'object' == typeof experiments.buildHttp && D(experiments.buildHttp, 'upgrade', !1), D(experiments, 'useInputFileSystem', !1);
|
|
6571
|
+
D(experiments, 'futureDefaults', !1), D(experiments, 'asyncWebAssembly', !0), D(experiments, 'deferImport', !1), D(experiments, 'buildHttp', void 0), experiments.buildHttp && 'object' == typeof experiments.buildHttp && D(experiments.buildHttp, 'upgrade', !1), D(experiments, 'useInputFileSystem', !1), D(experiments, 'pureFunctions', !1);
|
|
6555
6572
|
}, applyIncrementalDefaults = (options)=>{
|
|
6556
6573
|
D(options, 'incremental', {}), 'object' == typeof options.incremental && (D(options.incremental, 'silent', !0), D(options.incremental, 'buildModuleGraph', !0), D(options.incremental, 'finishModules', !0), D(options.incremental, 'optimizeDependencies', !0), D(options.incremental, 'buildChunkGraph', !0), D(options.incremental, 'optimizeChunkModules', !0), D(options.incremental, 'moduleIds', !0), D(options.incremental, 'chunkIds', !0), D(options.incremental, 'modulesHashes', !0), D(options.incremental, 'modulesCodegen', !0), D(options.incremental, 'modulesRuntimeRequirements', !0), D(options.incremental, 'chunksRuntimeRequirements', !0), D(options.incremental, 'chunksHashes', !0), D(options.incremental, 'chunkAsset', !0), D(options.incremental, 'emitAssets', !0));
|
|
6557
6574
|
}, applySnapshotDefaults = (_snapshot, _env)=>{}, applyCssGeneratorOptionsDefaults = (generatorOptions, { targetProperties })=>{
|
|
@@ -6835,7 +6852,7 @@ You can also more options via the 'target' option: 'browserslist' / 'browserslis
|
|
|
6835
6852
|
return output.wasmLoading && enabledWasmLoadingTypes.add(output.wasmLoading), output.workerWasmLoading && enabledWasmLoadingTypes.add(output.workerWasmLoading), forEachEntry((desc)=>{
|
|
6836
6853
|
desc.wasmLoading && enabledWasmLoadingTypes.add(desc.wasmLoading);
|
|
6837
6854
|
}), Array.from(enabledWasmLoadingTypes);
|
|
6838
|
-
}), D(output, 'bundlerInfo', {}), 'object' == typeof output.bundlerInfo && (D(output.bundlerInfo, 'version', "2.0.0-rc.
|
|
6855
|
+
}), D(output, 'bundlerInfo', {}), 'object' == typeof output.bundlerInfo && (D(output.bundlerInfo, 'version', "2.0.0-rc.1"), D(output.bundlerInfo, 'bundler', 'rspack'), D(output.bundlerInfo, 'force', !1));
|
|
6839
6856
|
}, applyExternalsPresetsDefaults = (externalsPresets, { targetProperties, buildHttp, outputModule })=>{
|
|
6840
6857
|
let isUniversal = (key)=>!!(outputModule && targetProperties && null === targetProperties[key]);
|
|
6841
6858
|
D(externalsPresets, 'web', !buildHttp && targetProperties && (targetProperties.web || isUniversal('node'))), D(externalsPresets, 'node', targetProperties && (targetProperties.node || isUniversal('node'))), D(externalsPresets, 'electron', targetProperties && targetProperties.electron || isUniversal('electron')), D(externalsPresets, 'electronMain', targetProperties && !!targetProperties.electron && (targetProperties.electronMain || isUniversal('electronMain'))), D(externalsPresets, 'electronPreload', targetProperties && !!targetProperties.electron && (targetProperties.electronPreload || isUniversal('electronPreload'))), D(externalsPresets, 'electronRenderer', targetProperties && !!targetProperties.electron && (targetProperties.electronRenderer || isUniversal('electronRenderer'))), D(externalsPresets, 'nwjs', targetProperties && (targetProperties.nwjs || isUniversal('nwjs')));
|
|
@@ -8089,7 +8106,7 @@ class MultiStats {
|
|
|
8089
8106
|
obj.children = this.stats.map((stat, idx)=>{
|
|
8090
8107
|
let obj = stat.toJson(childOptions.children[idx]), compilationName = stat.compilation.name;
|
|
8091
8108
|
return obj.name = compilationName && makePathsRelative(childOptions.context, compilationName, stat.compilation.compiler.root), obj;
|
|
8092
|
-
}), childOptions.version && (obj.rspackVersion = "2.0.0-rc.
|
|
8109
|
+
}), childOptions.version && (obj.rspackVersion = "2.0.0-rc.1", obj.version = "5.75.0"), childOptions.hash && (obj.hash = obj.children.map((j)=>j.hash).join(''));
|
|
8093
8110
|
let mapError = (j, obj)=>({
|
|
8094
8111
|
...obj,
|
|
8095
8112
|
compilerPath: obj.compilerPath ? `${j.name}.${obj.compilerPath}` : j.name
|
|
@@ -9348,7 +9365,7 @@ let iterateConfig = (config, options, fn)=>{
|
|
|
9348
9365
|
object.hash = context.getStatsCompilation(compilation).hash;
|
|
9349
9366
|
},
|
|
9350
9367
|
version: (object)=>{
|
|
9351
|
-
object.version = "5.75.0", object.rspackVersion = "2.0.0-rc.
|
|
9368
|
+
object.version = "5.75.0", object.rspackVersion = "2.0.0-rc.1";
|
|
9352
9369
|
},
|
|
9353
9370
|
env: (object, _compilation, _context, { _env })=>{
|
|
9354
9371
|
object.env = _env;
|
|
@@ -10610,7 +10627,7 @@ class RspackOptionsApply {
|
|
|
10610
10627
|
moduleFilenameTemplate: options.output.devtoolModuleFilenameTemplate,
|
|
10611
10628
|
namespace: options.output.devtoolNamespace
|
|
10612
10629
|
}).apply(compiler);
|
|
10613
|
-
new JavascriptModulesPlugin().apply(compiler), new URLPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), new CssModulesPlugin().apply(compiler), new lib_EntryOptionPlugin().apply(compiler), assertNotNill(options.context), compiler.hooks.entryOption.call(options.context, options.entry), new RuntimePlugin().apply(compiler), options.output.bundlerInfo && new BundlerInfoRspackPlugin(options.output.bundlerInfo).apply(compiler), new InferAsyncModulesPlugin().apply(compiler), new APIPlugin().apply(compiler), new DataUriPlugin().apply(compiler), new FileUriPlugin().apply(compiler), options.experiments.buildHttp && new HttpUriPlugin(options.experiments.buildHttp).apply(compiler), new EnsureChunkConditionsPlugin().apply(compiler), options.optimization.mergeDuplicateChunks && new MergeDuplicateChunksPlugin().apply(compiler), options.optimization.sideEffects && new SideEffectsFlagPlugin().apply(compiler), options.optimization.providedExports && new FlagDependencyExportsPlugin().apply(compiler), options.optimization.usedExports && new FlagDependencyUsagePlugin('global' === options.optimization.usedExports).apply(compiler), options.optimization.concatenateModules && new ModuleConcatenationPlugin().apply(compiler), options.optimization.inlineExports && new InlineExportsPlugin().apply(compiler), options.optimization.mangleExports && new MangleExportsPlugin('size' !== options.optimization.mangleExports).apply(compiler);
|
|
10630
|
+
new JavascriptModulesPlugin().apply(compiler), new URLPlugin().apply(compiler), new JsonModulesPlugin().apply(compiler), new AssetModulesPlugin().apply(compiler), options.experiments.asyncWebAssembly && new AsyncWebAssemblyModulesPlugin().apply(compiler), new CssModulesPlugin().apply(compiler), new lib_EntryOptionPlugin().apply(compiler), assertNotNill(options.context), compiler.hooks.entryOption.call(options.context, options.entry), new RuntimePlugin().apply(compiler), options.output.bundlerInfo && new BundlerInfoRspackPlugin(options.output.bundlerInfo).apply(compiler), new InferAsyncModulesPlugin().apply(compiler), new APIPlugin().apply(compiler), new DataUriPlugin().apply(compiler), new FileUriPlugin().apply(compiler), options.experiments.buildHttp && new HttpUriPlugin(options.experiments.buildHttp).apply(compiler), new EnsureChunkConditionsPlugin().apply(compiler), options.optimization.mergeDuplicateChunks && new MergeDuplicateChunksPlugin().apply(compiler), options.optimization.sideEffects && new SideEffectsFlagPlugin(options.experiments.pureFunctions).apply(compiler), options.optimization.providedExports && new FlagDependencyExportsPlugin().apply(compiler), options.optimization.usedExports && new FlagDependencyUsagePlugin('global' === options.optimization.usedExports).apply(compiler), options.optimization.concatenateModules && new ModuleConcatenationPlugin().apply(compiler), options.optimization.inlineExports && new InlineExportsPlugin().apply(compiler), options.optimization.mangleExports && new MangleExportsPlugin('size' !== options.optimization.mangleExports).apply(compiler);
|
|
10614
10631
|
let enableLibSplitChunks = !1;
|
|
10615
10632
|
if (options.output.enabledLibraryTypes && options.output.enabledLibraryTypes.length > 0) {
|
|
10616
10633
|
let hasModernModule = options.output.enabledLibraryTypes.includes('modern-module'), hasNonModernModule = options.output.enabledLibraryTypes.some((t)=>'modern-module' !== t);
|
|
@@ -10628,6 +10645,9 @@ class RspackOptionsApply {
|
|
|
10628
10645
|
case 'deterministic':
|
|
10629
10646
|
new DeterministicModuleIdsPlugin().apply(compiler);
|
|
10630
10647
|
break;
|
|
10648
|
+
case 'hashed':
|
|
10649
|
+
new HashedModuleIdsPlugin().apply(compiler);
|
|
10650
|
+
break;
|
|
10631
10651
|
default:
|
|
10632
10652
|
throw Error(`moduleIds: ${moduleIds} is not implemented`);
|
|
10633
10653
|
}
|
|
@@ -11005,7 +11025,7 @@ class TraceHookPlugin {
|
|
|
11005
11025
|
});
|
|
11006
11026
|
}
|
|
11007
11027
|
}
|
|
11008
|
-
let CORE_VERSION = "2.0.0-rc.
|
|
11028
|
+
let CORE_VERSION = "2.0.0-rc.1", VFILES_BY_COMPILER = new WeakMap();
|
|
11009
11029
|
class VirtualModulesPlugin {
|
|
11010
11030
|
#staticModules;
|
|
11011
11031
|
#compiler;
|
|
@@ -12336,6 +12356,17 @@ Object.defineProperty(binding_default().ConcatenatedModule.prototype, 'identifie
|
|
|
12336
12356
|
return this._emitFile(filename, SourceAdapter.toBinding(source), assetInfo);
|
|
12337
12357
|
}
|
|
12338
12358
|
});
|
|
12359
|
+
let ModuleGraphConnection = binding_namespaceObject.ModuleGraphConnection;
|
|
12360
|
+
Object.defineProperties(ModuleGraphConnection, {
|
|
12361
|
+
TRANSITIVE_ONLY: {
|
|
12362
|
+
value: binding_namespaceObject.TRANSITIVE_ONLY_SYMBOL,
|
|
12363
|
+
enumerable: !0
|
|
12364
|
+
},
|
|
12365
|
+
CIRCULAR_CONNECTION: {
|
|
12366
|
+
value: binding_namespaceObject.CIRCULAR_CONNECTION_SYMBOL,
|
|
12367
|
+
enumerable: !0
|
|
12368
|
+
}
|
|
12369
|
+
});
|
|
12339
12370
|
let asRegExp = (test)=>'string' == typeof test ? RegExp(`^${test.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&')}`) : test, matchPart = (str, test)=>!test || (Array.isArray(test) ? test.map(asRegExp).some((regExp)=>regExp.test(str)) : asRegExp(test).test(str)), matchObject = (obj, str)=>!(obj.test && !matchPart(str, obj.test) || obj.include && !matchPart(str, obj.include) || obj.exclude && matchPart(str, obj.exclude)), FlagAllModulesAsUsedPlugin = base_create(binding_namespaceObject.BuiltinPluginName.FlagAllModulesAsUsedPlugin, (explanation)=>({
|
|
12340
12371
|
explanation
|
|
12341
12372
|
}));
|
|
@@ -13300,7 +13331,7 @@ async function transform(source, options) {
|
|
|
13300
13331
|
let _options = JSON.stringify(options || {});
|
|
13301
13332
|
return binding_default().transform(source, _options);
|
|
13302
13333
|
}
|
|
13303
|
-
let exports_rspackVersion = "2.0.0-rc.
|
|
13334
|
+
let exports_rspackVersion = "2.0.0-rc.1", exports_version = "5.75.0", exports_WebpackError = Error, exports_config = {
|
|
13304
13335
|
getNormalizedRspackOptions: getNormalizedRspackOptions,
|
|
13305
13336
|
applyRspackOptionsDefaults: applyRspackOptionsDefaults,
|
|
13306
13337
|
getNormalizedWebpackOptions: getNormalizedRspackOptions,
|
|
@@ -13325,6 +13356,8 @@ let exports_rspackVersion = "2.0.0-rc.0", exports_version = "5.75.0", exports_We
|
|
|
13325
13356
|
NodeEnvironmentPlugin: NodeEnvironmentPlugin
|
|
13326
13357
|
}, electron = {
|
|
13327
13358
|
ElectronTargetPlugin: ElectronTargetPlugin
|
|
13359
|
+
}, exports_ids = {
|
|
13360
|
+
HashedModuleIdsPlugin: HashedModuleIdsPlugin
|
|
13328
13361
|
}, exports_library = {
|
|
13329
13362
|
EnableLibraryPlugin: EnableLibraryPlugin
|
|
13330
13363
|
}, exports_wasm = {
|
|
@@ -13533,4 +13566,4 @@ src_fn.rspack = src_fn, src_fn.webpack = src_fn;
|
|
|
13533
13566
|
let src_rspack_0 = src_fn;
|
|
13534
13567
|
var AsyncDependenciesBlock = binding_namespaceObject.AsyncDependenciesBlock, ConcatenatedModule = binding_namespaceObject.ConcatenatedModule, ContextModule = binding_namespaceObject.ContextModule, Dependency = binding_namespaceObject.Dependency, EntryDependency = binding_namespaceObject.EntryDependency, ExternalModule = binding_namespaceObject.ExternalModule, Module = binding_namespaceObject.Module, NormalModule = binding_namespaceObject.NormalModule;
|
|
13535
13568
|
export default src_rspack_0;
|
|
13536
|
-
export { AsyncDependenciesBlock, BannerPlugin, CaseSensitivePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ConcatenatedModule, ContextModule, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefaultRuntimeGlobals as RuntimeGlobals, DefinePlugin, Dependency, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, EntryDependency, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalModule, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, Module, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModule, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, SubresourceIntegrityPlugin, SwcJsMinimizerRspackPlugin, Template, ValidationError, container, electron, exports_WebpackError as WebpackError, exports_config as config, exports_experiments as experiments, exports_library as library, exports_node as node, exports_rspackVersion as rspackVersion, exports_version as version, exports_wasm as wasm, index_js_namespaceObject as sources, javascript, lazyCompilationMiddleware, lib_EntryOptionPlugin as EntryOptionPlugin, optimize, sharing, src_rspack_0 as "module.exports", src_rspack_0 as rspack, statsFactoryUtils_StatsErrorCode as StatsErrorCode, util, web, webworker };
|
|
13569
|
+
export { AsyncDependenciesBlock, BannerPlugin, CaseSensitivePlugin, CircularDependencyRspackPlugin, Compilation, Compiler, ConcatenatedModule, ContextModule, ContextReplacementPlugin, CopyRspackPlugin, CssExtractRspackPlugin, DefaultRuntimeGlobals as RuntimeGlobals, DefinePlugin, Dependency, DllPlugin, DllReferencePlugin, DynamicEntryPlugin, EntryDependency, EntryPlugin, EnvironmentPlugin, EvalDevToolModulePlugin, EvalSourceMapDevToolPlugin, ExternalModule, ExternalsPlugin, HotModuleReplacementPlugin, HtmlRspackPlugin, IgnorePlugin, LightningCssMinimizerRspackPlugin, LoaderOptionsPlugin, LoaderTargetPlugin, Module, ModuleFilenameHelpers_namespaceObject as ModuleFilenameHelpers, ModuleGraphConnection, MultiCompiler, MultiStats, NoEmitOnErrorsPlugin, NormalModule, NormalModuleReplacementPlugin, ProgressPlugin, ProvidePlugin, RspackOptionsApply, RspackOptionsApply as WebpackOptionsApply, RuntimeModule, RuntimePlugin, SourceMapDevToolPlugin, Stats, SubresourceIntegrityPlugin, SwcJsMinimizerRspackPlugin, Template, ValidationError, container, electron, exports_WebpackError as WebpackError, exports_config as config, exports_experiments as experiments, exports_ids as ids, exports_library as library, exports_node as node, exports_rspackVersion as rspackVersion, exports_version as version, exports_wasm as wasm, index_js_namespaceObject as sources, javascript, lazyCompilationMiddleware, lib_EntryOptionPlugin as EntryOptionPlugin, optimize, sharing, src_rspack_0 as "module.exports", src_rspack_0 as rspack, statsFactoryUtils_StatsErrorCode as StatsErrorCode, util, web, webworker };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rspack/core",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.1",
|
|
4
4
|
"webpackVersion": "5.75.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "Fast Rust-based bundler for the web with a modernized webpack API",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"@ast-grep/napi": "^0.42.0",
|
|
41
41
|
"@napi-rs/wasm-runtime": "1.1.2",
|
|
42
42
|
"@rsbuild/plugin-node-polyfill": "^1.4.4",
|
|
43
|
-
"@rslib/core": "0.20.
|
|
43
|
+
"@rslib/core": "0.20.3",
|
|
44
44
|
"@rspack/lite-tapable": "1.1.0",
|
|
45
45
|
"@swc/types": "0.1.26",
|
|
46
|
-
"@types/node": "^20.19.
|
|
46
|
+
"@types/node": "^20.19.39",
|
|
47
47
|
"@types/watchpack": "^2.4.5",
|
|
48
48
|
"browserslist-load-config": "^1.0.1",
|
|
49
49
|
"browserslist-to-es-version": "^1.4.1",
|
|
50
|
-
"connect-next": "^4.0.
|
|
50
|
+
"connect-next": "^4.0.1",
|
|
51
51
|
"enhanced-resolve": "5.20.1",
|
|
52
52
|
"http-proxy-middleware": "^3.0.5",
|
|
53
53
|
"memfs": "4.53.0",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"webpack-sources": "3.3.4"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@rspack/binding": "2.0.0-rc.
|
|
62
|
+
"@rspack/binding": "2.0.0-rc.1"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
65
|
"@module-federation/runtime-tools": "^0.24.1 || ^2.0.0",
|