@rspack/core 1.0.10 → 1.0.12
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/browserslist/index.js +94 -49
- package/compiled/browserslist/package.json +1 -1
- package/dist/builtin-plugin/css-extract/utils.d.ts +1 -0
- package/dist/config/types.d.ts +309 -0
- package/dist/config/zod.d.ts +22 -534
- package/dist/cssExtractHmr.js +224 -0
- package/dist/cssExtractLoader.js +277 -0
- package/dist/index.js +23255 -31
- package/dist/{builtin-plugin/css-extract/hmr/hotModuleReplacement.d.ts → runtime/cssExtractHmr.d.ts} +1 -0
- package/dist/runtime/moduleFederationDefaultRuntime.d.ts +2 -0
- package/dist/stats/statsFactoryUtils.d.ts +1 -0
- package/package.json +8 -5
- package/compiled/json-parse-even-better-errors/index.d.ts +0 -1
- package/compiled/json-parse-even-better-errors/index.js +0 -193
- package/compiled/json-parse-even-better-errors/package.json +0 -1
- package/compiled/neo-async/index.d.ts +0 -685
- package/compiled/neo-async/index.js +0 -9207
- package/compiled/neo-async/license +0 -22
- package/compiled/neo-async/package.json +0 -1
- package/compiled/zod-validation-error/index.d.ts +0 -41
- package/compiled/zod-validation-error/index.js +0 -335
- package/compiled/zod-validation-error/license +0 -9
- package/compiled/zod-validation-error/package.json +0 -1
- package/dist/Chunk.js +0 -118
- package/dist/ChunkGraph.js +0 -27
- package/dist/ChunkGroup.js +0 -76
- package/dist/Compilation.js +0 -854
- package/dist/Compiler.js +0 -925
- package/dist/ContextModuleFactory.js +0 -36
- package/dist/DependenciesBlock.js +0 -30
- package/dist/Dependency.js +0 -43
- package/dist/Entrypoint.js +0 -21
- package/dist/ErrorHelpers.js +0 -62
- package/dist/ExecuteModulePlugin.js +0 -46
- package/dist/FileSystem.js +0 -34
- package/dist/FileSystemInfo.js +0 -2
- package/dist/Module.js +0 -226
- package/dist/ModuleTypeConstants.js +0 -92
- package/dist/MultiCompiler.js +0 -440
- package/dist/MultiStats.js +0 -161
- package/dist/MultiWatching.js +0 -62
- package/dist/NormalModule.js +0 -97
- package/dist/NormalModuleFactory.js +0 -43
- package/dist/Resolver.js +0 -39
- package/dist/ResolverFactory.js +0 -61
- package/dist/RspackError.js +0 -21
- package/dist/RuleSetCompiler.js +0 -10
- package/dist/RuntimeGlobals.js +0 -357
- package/dist/RuntimeModule.js +0 -58
- package/dist/Stats.js +0 -161
- package/dist/Template.js +0 -206
- package/dist/Watching.js +0 -290
- package/dist/builtin-loader/index.js +0 -17
- package/dist/builtin-loader/lightningcss/index.js +0 -175
- package/dist/builtin-loader/swc/index.js +0 -5
- package/dist/builtin-loader/swc/pluginImport.js +0 -35
- package/dist/builtin-loader/swc/react.js +0 -7
- package/dist/builtin-loader/swc/types.js +0 -2
- package/dist/builtin-plugin/APIPlugin.js +0 -6
- package/dist/builtin-plugin/ArrayPushCallbackChunkFormatPlugin.js +0 -6
- package/dist/builtin-plugin/AssetModulesPlugin.js +0 -6
- package/dist/builtin-plugin/AsyncWebAssemblyModulesPlugin.js +0 -6
- package/dist/builtin-plugin/BannerPlugin.js +0 -22
- package/dist/builtin-plugin/BundlerInfoRspackPlugin.js +0 -12
- package/dist/builtin-plugin/ChunkPrefetchPreloadPlugin.js +0 -6
- package/dist/builtin-plugin/CommonJsChunkFormatPlugin.js +0 -6
- package/dist/builtin-plugin/ContextReplacementPlugin.js +0 -43
- package/dist/builtin-plugin/CopyRspackPlugin.js +0 -21
- package/dist/builtin-plugin/CssModulesPlugin.js +0 -6
- package/dist/builtin-plugin/DataUriPlugin.js +0 -6
- package/dist/builtin-plugin/DefinePlugin.js +0 -44
- package/dist/builtin-plugin/DeterministicChunkIdsPlugin.js +0 -6
- package/dist/builtin-plugin/DeterministicModuleIdsPlugin.js +0 -6
- package/dist/builtin-plugin/DynamicEntryPlugin.js +0 -36
- package/dist/builtin-plugin/ElectronTargetPlugin.js +0 -6
- package/dist/builtin-plugin/EnableChunkLoadingPlugin.js +0 -6
- package/dist/builtin-plugin/EnableLibraryPlugin.js +0 -39
- package/dist/builtin-plugin/EnableWasmLoadingPlugin.js +0 -6
- package/dist/builtin-plugin/EnsureChunkConditionsPlugin.js +0 -6
- package/dist/builtin-plugin/EntryPlugin.js +0 -34
- package/dist/builtin-plugin/EvalDevToolModulePlugin.js +0 -6
- package/dist/builtin-plugin/EvalSourceMapDevToolPlugin.js +0 -16
- package/dist/builtin-plugin/ExternalsPlugin.js +0 -51
- package/dist/builtin-plugin/FetchCompileAsyncWasmPlugin.js +0 -6
- package/dist/builtin-plugin/FileUriPlugin.js +0 -6
- package/dist/builtin-plugin/FlagDependencyExportsPlugin.js +0 -6
- package/dist/builtin-plugin/FlagDependencyUsagePlugin.js +0 -6
- package/dist/builtin-plugin/HotModuleReplacementPlugin.js +0 -18
- package/dist/builtin-plugin/HtmlRspackPlugin.js +0 -285
- package/dist/builtin-plugin/HttpExternalsRspackPlugin.js +0 -11
- package/dist/builtin-plugin/IgnorePlugin.js +0 -20
- package/dist/builtin-plugin/InferAsyncModulesPlugin.js +0 -6
- package/dist/builtin-plugin/JavascriptModulesPlugin.js +0 -55
- package/dist/builtin-plugin/JsLoaderRspackPlugin.js +0 -9
- package/dist/builtin-plugin/JsonModulesPlugin.js +0 -6
- package/dist/builtin-plugin/LightningCssMiminizerRspackPlugin.js +0 -30
- package/dist/builtin-plugin/LimitChunkCountPlugin.js +0 -8
- package/dist/builtin-plugin/MangleExportsPlugin.js +0 -6
- package/dist/builtin-plugin/MergeDuplicateChunksPlugin.js +0 -6
- package/dist/builtin-plugin/ModuleChunkFormatPlugin.js +0 -6
- package/dist/builtin-plugin/ModuleConcatenationPlugin.js +0 -6
- package/dist/builtin-plugin/NamedChunkIdsPlugin.js +0 -6
- package/dist/builtin-plugin/NamedModuleIdsPlugin.js +0 -6
- package/dist/builtin-plugin/NaturalChunkIdsPlugin.js +0 -6
- package/dist/builtin-plugin/NaturalModuleIdsPlugin.js +0 -6
- package/dist/builtin-plugin/NoEmitOnErrorsPlugin.js +0 -6
- package/dist/builtin-plugin/NodeTargetPlugin.js +0 -6
- package/dist/builtin-plugin/ProgressPlugin.js +0 -15
- package/dist/builtin-plugin/ProvidePlugin.js +0 -14
- package/dist/builtin-plugin/RealContentHashPlugin.js +0 -6
- package/dist/builtin-plugin/RemoveEmptyChunksPlugin.js +0 -6
- package/dist/builtin-plugin/RuntimeChunkPlugin.js +0 -6
- package/dist/builtin-plugin/RuntimePlugin.js +0 -6
- package/dist/builtin-plugin/SideEffectsFlagPlugin.js +0 -6
- package/dist/builtin-plugin/SizeLimitsPlugin.js +0 -9
- package/dist/builtin-plugin/SourceMapDevToolPlugin.js +0 -14
- package/dist/builtin-plugin/SplitChunksPlugin.js +0 -92
- package/dist/builtin-plugin/SwcJsMinimizerPlugin.js +0 -80
- package/dist/builtin-plugin/WarnCaseSensitiveModulesPlugin.js +0 -6
- package/dist/builtin-plugin/WebWorkerTemplatePlugin.js +0 -6
- package/dist/builtin-plugin/WorkerPlugin.js +0 -31
- package/dist/builtin-plugin/base.js +0 -58
- package/dist/builtin-plugin/css-extract/hmr/hotModuleReplacement.js +0 -182
- package/dist/builtin-plugin/css-extract/hmr/normalizeUrl.d.ts +0 -2
- package/dist/builtin-plugin/css-extract/hmr/normalizeUrl.js +0 -31
- package/dist/builtin-plugin/css-extract/index.js +0 -105
- package/dist/builtin-plugin/css-extract/loader.js +0 -204
- package/dist/builtin-plugin/css-extract/utils.js +0 -51
- package/dist/builtin-plugin/index.js +0 -84
- package/dist/builtin-plugin/lazy-compilation/backend.js +0 -139
- package/dist/builtin-plugin/lazy-compilation/lazyCompilation.js +0 -6
- package/dist/builtin-plugin/lazy-compilation/plugin.js +0 -60
- package/dist/config/adapter.js +0 -691
- package/dist/config/adapterRuleUse.js +0 -107
- package/dist/config/browserslistTargetHandler.js +0 -345
- package/dist/config/defaults.js +0 -876
- package/dist/config/index.js +0 -20
- package/dist/config/normalization.js +0 -299
- package/dist/config/target.js +0 -318
- package/dist/config/types.js +0 -3
- package/dist/config/zod.js +0 -1030
- package/dist/container/ContainerPlugin.js +0 -50
- package/dist/container/ContainerReferencePlugin.js +0 -49
- package/dist/container/ModuleFederationPlugin.js +0 -137
- package/dist/container/ModuleFederationPluginV1.js +0 -63
- package/dist/container/ModuleFederationRuntimePlugin.js +0 -6
- package/dist/container/options.js +0 -48
- package/dist/error/ConcurrentCompilationError.js +0 -20
- package/dist/exports.js +0 -183
- package/dist/lib/AbstractMethodError.js +0 -51
- package/dist/lib/Cache.js +0 -111
- package/dist/lib/CacheFacade.js +0 -321
- package/dist/lib/Dependency.js +0 -11
- package/dist/lib/EntryOptionPlugin.js +0 -89
- package/dist/lib/EnvironmentPlugin.js +0 -57
- package/dist/lib/HookWebpackError.js +0 -83
- package/dist/lib/IgnoreWarningsPlugin.js +0 -35
- package/dist/lib/LoaderOptionsPlugin.js +0 -74
- package/dist/lib/LoaderTargetPlugin.js +0 -37
- package/dist/lib/ModuleFilenameHelpers.js +0 -83
- package/dist/lib/NormalModuleReplacementPlugin.js +0 -85
- package/dist/lib/WebpackError.js +0 -20
- package/dist/lib/cache/MemoryCachePlugin.js +0 -40
- package/dist/lib/cache/getLazyHashedEtag.js +0 -73
- package/dist/lib/cache/mergeEtags.js +0 -74
- package/dist/lib/formatLocation.js +0 -64
- package/dist/loader-runner/LoaderLoadingError.js +0 -19
- package/dist/loader-runner/index.js +0 -735
- package/dist/loader-runner/loadLoader.js +0 -64
- package/dist/logging/Logger.js +0 -143
- package/dist/logging/createConsoleLogger.js +0 -176
- package/dist/logging/runtime.js +0 -37
- package/dist/logging/truncateArgs.js +0 -81
- package/dist/node/NodeEnvironmentPlugin.js +0 -50
- package/dist/node/NodeTemplatePlugin.js +0 -26
- package/dist/node/NodeWatchFileSystem.js +0 -144
- package/dist/node/nodeConsole.js +0 -146
- package/dist/rspack.js +0 -123
- package/dist/rspackOptionsApply.js +0 -274
- package/dist/sharing/ConsumeSharedPlugin.js +0 -69
- package/dist/sharing/ProvideSharedPlugin.js +0 -50
- package/dist/sharing/SharePlugin.js +0 -66
- package/dist/sharing/ShareRuntimePlugin.js +0 -26
- package/dist/sharing/utils.js +0 -8
- package/dist/stats/DefaultStatsFactoryPlugin.js +0 -1173
- package/dist/stats/DefaultStatsPresetPlugin.js +0 -305
- package/dist/stats/DefaultStatsPrinterPlugin.js +0 -1069
- package/dist/stats/StatsFactory.js +0 -167
- package/dist/stats/StatsPrinter.js +0 -142
- package/dist/stats/statsFactoryUtils.js +0 -341
- package/dist/util/ArrayQueue.js +0 -108
- package/dist/util/AssetInfo.js +0 -39
- package/dist/util/IterableHelpers.js +0 -35
- package/dist/util/MergeCaller.js +0 -24
- package/dist/util/SizeFormatHelpers.js +0 -24
- package/dist/util/SplitChunkSize.js +0 -18
- package/dist/util/assertNotNil.js +0 -9
- package/dist/util/assetCondition.js +0 -2
- package/dist/util/bindingVersionCheck.js +0 -124
- package/dist/util/cleverMerge.js +0 -504
- package/dist/util/comparators.js +0 -108
- package/dist/util/createHash.js +0 -161
- package/dist/util/createReadonlyMap.js +0 -29
- package/dist/util/fake.js +0 -28
- package/dist/util/fs.js +0 -120
- package/dist/util/hash/BatchedHash.js +0 -69
- package/dist/util/hash/index.js +0 -39
- package/dist/util/hash/md4.js +0 -27
- package/dist/util/hash/wasm-hash.js +0 -167
- package/dist/util/hash/xxhash64.js +0 -27
- package/dist/util/identifier.js +0 -330
- package/dist/util/index.js +0 -123
- package/dist/util/memoize.js +0 -61
- package/dist/util/scheme.js +0 -57
- package/dist/util/smartGrouping.js +0 -148
- package/dist/util/source.js +0 -42
- package/dist/util/validate.js +0 -77
- package/dist/util/webpack.js +0 -27
- /package/dist/{container/default.runtime.js → moduleFederationDefaultRuntime.js} +0 -0
package/dist/config/types.d.ts
CHANGED
|
@@ -127,6 +127,315 @@ export type EntryStatic = EntryObject | EntryUnnamed;
|
|
|
127
127
|
export type EntryDynamic = () => EntryStatic | Promise<EntryStatic>;
|
|
128
128
|
/** The entry options for building */
|
|
129
129
|
export type Entry = EntryStatic | EntryDynamic;
|
|
130
|
+
/** The output directory as an absolute path. */
|
|
131
|
+
export type Path = string;
|
|
132
|
+
/** Tells Rspack to include comments in bundles with information about the contained modules. */
|
|
133
|
+
export type Pathinfo = boolean | "verbose";
|
|
134
|
+
/** Before generating the products, delete all files in the output directory. */
|
|
135
|
+
export type AssetModuleFilename = Filename;
|
|
136
|
+
/** Specifies the filename of WebAssembly modules. */
|
|
137
|
+
export type WebassemblyModuleFilename = string;
|
|
138
|
+
/** This option determines the name of non-initial chunk files. */
|
|
139
|
+
export type ChunkFilename = Filename;
|
|
140
|
+
/** Allows you to set the [crossorigin attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) */
|
|
141
|
+
export type CrossOriginLoading = false | "anonymous" | "use-credentials";
|
|
142
|
+
/** This option determines the name of CSS output files on disk. */
|
|
143
|
+
export type CssFilename = Filename;
|
|
144
|
+
/** This option determines the name of non-initial CSS output files on disk. */
|
|
145
|
+
export type CssChunkFilename = Filename;
|
|
146
|
+
/** Customize the filenames of hot update chunks. */
|
|
147
|
+
export type HotUpdateChunkFilename = FilenameTemplate;
|
|
148
|
+
/** Customize the main hot update filename. */
|
|
149
|
+
export type HotUpdateMainFilename = FilenameTemplate;
|
|
150
|
+
/** Which uses JSONP for loading hot updates. */
|
|
151
|
+
export type HotUpdateGlobal = string;
|
|
152
|
+
/** A unique name of the Rspack build */
|
|
153
|
+
export type UniqueName = string;
|
|
154
|
+
/** The global variable is used by Rspack for loading chunks. */
|
|
155
|
+
export type ChunkLoadingGlobal = string;
|
|
156
|
+
/** List of library types enabled for use by entry points. */
|
|
157
|
+
export type EnabledLibraryTypes = string[];
|
|
158
|
+
/** Whether delete all files in the output directory. */
|
|
159
|
+
export type Clean = boolean;
|
|
160
|
+
/** Output JavaScript files as module type. */
|
|
161
|
+
export type OutputModule = boolean;
|
|
162
|
+
/** Tell Rspack to remove a module from the module instance cache (require.cache) if it throws an exception when it is required. */
|
|
163
|
+
export type StrictModuleExceptionHandling = boolean;
|
|
164
|
+
/** Handle error in module loading as per EcmaScript Modules spec at a performance cost. */
|
|
165
|
+
export type StrictModuleErrorHandling = boolean;
|
|
166
|
+
/** Indicates what global object will be used to mount the library. */
|
|
167
|
+
export type GlobalObject = string;
|
|
168
|
+
/** List of wasm loading types enabled for use by entry points. */
|
|
169
|
+
export type EnabledWasmLoadingTypes = string[];
|
|
170
|
+
/** The name of the native import() function. */
|
|
171
|
+
export type ImportFunctionName = string;
|
|
172
|
+
/** The name of the native import.meta object. */
|
|
173
|
+
export type ImportMetaName = string;
|
|
174
|
+
/** Tells Rspack to add IIFE wrapper around emitted code. */
|
|
175
|
+
export type Iife = boolean;
|
|
176
|
+
/** List of chunk loading types enabled for use by entry points. */
|
|
177
|
+
export type EnabledChunkLoadingTypes = string[];
|
|
178
|
+
/** The format of chunks */
|
|
179
|
+
export type ChunkFormat = string | false;
|
|
180
|
+
/** Set a public path for Worker. */
|
|
181
|
+
export type WorkerPublicPath = string;
|
|
182
|
+
/** Controls [Trusted Types](https://web.dev/articles/trusted-types) compatibility. */
|
|
183
|
+
export type TrustedTypes = {
|
|
184
|
+
policyName?: string;
|
|
185
|
+
};
|
|
186
|
+
/** The encoding to use when generating the hash. */
|
|
187
|
+
export type HashDigest = string;
|
|
188
|
+
/** The prefix length of the hash digest to use. */
|
|
189
|
+
export type HashDigestLength = number;
|
|
190
|
+
/** The hashing algorithm to use. */
|
|
191
|
+
export type HashFunction = "md4" | "xxhash64";
|
|
192
|
+
/** An optional salt to update the hash. */
|
|
193
|
+
export type HashSalt = string;
|
|
194
|
+
/** Configure how source maps are named. */
|
|
195
|
+
export type SourceMapFilename = string;
|
|
196
|
+
/** This option determines the module's namespace */
|
|
197
|
+
export type DevtoolNamespace = string;
|
|
198
|
+
/** This option is only used when devtool uses an option that requires module names. */
|
|
199
|
+
export type DevtoolModuleFilenameTemplate = string | ((info: any) => any);
|
|
200
|
+
/** A fallback is used when the template string or function above yields duplicates. */
|
|
201
|
+
export type DevtoolFallbackModuleFilenameTemplate = DevtoolModuleFilenameTemplate;
|
|
202
|
+
/** Tell Rspack what kind of ES-features may be used in the generated runtime-code. */
|
|
203
|
+
export type Environment = {
|
|
204
|
+
/** The environment supports arrow functions ('() => { ... }'). */
|
|
205
|
+
arrowFunction?: boolean;
|
|
206
|
+
/** The environment supports async function and await ('async function () { await ... }'). */
|
|
207
|
+
asyncFunction?: boolean;
|
|
208
|
+
/** The environment supports BigInt as literal (123n). */
|
|
209
|
+
bigIntLiteral?: boolean;
|
|
210
|
+
/** The environment supports const and let for variable declarations. */
|
|
211
|
+
const?: boolean;
|
|
212
|
+
/** The environment supports destructuring ('{ a, b } = obj'). */
|
|
213
|
+
destructuring?: boolean;
|
|
214
|
+
/** The environment supports 'document' variable. */
|
|
215
|
+
document?: boolean;
|
|
216
|
+
/** The environment supports an async import() function to import EcmaScript modules. */
|
|
217
|
+
dynamicImport?: boolean;
|
|
218
|
+
/** The environment supports an async import() when creating a worker, only for web targets at the moment. */
|
|
219
|
+
dynamicImportInWorker?: boolean;
|
|
220
|
+
/** The environment supports 'for of' iteration ('for (const x of array) { ... }'). */
|
|
221
|
+
forOf?: boolean;
|
|
222
|
+
/** The environment supports 'globalThis'. */
|
|
223
|
+
globalThis?: boolean;
|
|
224
|
+
/** The environment supports ECMAScript Module syntax to import ECMAScript modules (import ... from '...'). */
|
|
225
|
+
module?: boolean;
|
|
226
|
+
/**
|
|
227
|
+
* Determines if the node: prefix is generated for core module imports in environments that support it.
|
|
228
|
+
* This is only applicable to Webpack runtime code.
|
|
229
|
+
* */
|
|
230
|
+
nodePrefixForCoreModules?: boolean;
|
|
231
|
+
/** The environment supports optional chaining ('obj?.a' or 'obj?.()'). */
|
|
232
|
+
optionalChaining?: boolean;
|
|
233
|
+
/** The environment supports template literals. */
|
|
234
|
+
templateLiteral?: boolean;
|
|
235
|
+
};
|
|
236
|
+
export type Output = {
|
|
237
|
+
/**
|
|
238
|
+
* The output directory as an absolute path.
|
|
239
|
+
* @default path.resolve(process.cwd(), 'dist')
|
|
240
|
+
* */
|
|
241
|
+
path?: Path;
|
|
242
|
+
/**
|
|
243
|
+
* Tells Rspack to include comments in bundles with information about the contained modules.
|
|
244
|
+
* @default true
|
|
245
|
+
*/
|
|
246
|
+
pathinfo?: Pathinfo;
|
|
247
|
+
/**
|
|
248
|
+
* Before generating the products, whether delete all files in the output directory.
|
|
249
|
+
* @default false
|
|
250
|
+
* */
|
|
251
|
+
clean?: Clean;
|
|
252
|
+
/** This option determines the URL prefix of the referenced resource, such as: image, file, etc. */
|
|
253
|
+
publicPath?: PublicPath;
|
|
254
|
+
/** This option determines the name of each output bundle. */
|
|
255
|
+
filename?: Filename;
|
|
256
|
+
/** This option determines the name of non-initial chunk files. */
|
|
257
|
+
chunkFilename?: ChunkFilename;
|
|
258
|
+
/** Allows you to set the [crossorigin attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script) for dynamically loaded chunks. */
|
|
259
|
+
crossOriginLoading?: CrossOriginLoading;
|
|
260
|
+
/** This option determines the name of CSS output files on disk. */
|
|
261
|
+
cssFilename?: CssFilename;
|
|
262
|
+
/**
|
|
263
|
+
* Rspack adds some metadata in CSS to parse CSS modules, and this configuration determines whether to compress these metadata.
|
|
264
|
+
*
|
|
265
|
+
* The value is `true` in production mode.
|
|
266
|
+
* The value is `false` in development mode.
|
|
267
|
+
* */
|
|
268
|
+
cssHeadDataCompression?: boolean;
|
|
269
|
+
/** This option determines the name of non-initial CSS output files on disk. */
|
|
270
|
+
cssChunkFilename?: CssChunkFilename;
|
|
271
|
+
/**
|
|
272
|
+
* Customize the main hot update filename. [fullhash] and [runtime] are available as placeholder.
|
|
273
|
+
* @default '[runtime].[fullhash].hot-update.json'
|
|
274
|
+
* */
|
|
275
|
+
hotUpdateMainFilename?: HotUpdateMainFilename;
|
|
276
|
+
/**
|
|
277
|
+
* Customize the filenames of hot update chunks.
|
|
278
|
+
* @default '[id].[fullhash].hot-update.js'
|
|
279
|
+
* */
|
|
280
|
+
hotUpdateChunkFilename?: HotUpdateChunkFilename;
|
|
281
|
+
/**
|
|
282
|
+
* Only used when target is set to 'web', which uses JSONP for loading hot updates.
|
|
283
|
+
* @default 'webpackHotUpdate' + output.uniqueName
|
|
284
|
+
* */
|
|
285
|
+
hotUpdateGlobal?: HotUpdateGlobal;
|
|
286
|
+
/**
|
|
287
|
+
* This option determines the name of each asset modules.
|
|
288
|
+
* @default '[hash][ext][query]'
|
|
289
|
+
* */
|
|
290
|
+
assetModuleFilename?: AssetModuleFilename;
|
|
291
|
+
/** A unique name of the Rspack build to avoid multiple Rspack runtimes to conflict when using globals. */
|
|
292
|
+
uniqueName?: UniqueName;
|
|
293
|
+
/**
|
|
294
|
+
* The global variable is used by Rspack for loading chunks.
|
|
295
|
+
* Determined by output.uniqueName default.
|
|
296
|
+
* */
|
|
297
|
+
chunkLoadingGlobal?: ChunkLoadingGlobal;
|
|
298
|
+
/**
|
|
299
|
+
* List of library types enabled for use by entry points.
|
|
300
|
+
* Determined by output.library and Entry default.
|
|
301
|
+
* */
|
|
302
|
+
enabledLibraryTypes?: EnabledLibraryTypes;
|
|
303
|
+
/** Output a library exposing the exports of your entry point. */
|
|
304
|
+
library?: Library;
|
|
305
|
+
/**
|
|
306
|
+
* Specify which export should be exposed as a library.
|
|
307
|
+
* @deprecated We might drop support for this, so prefer to use output.library.export
|
|
308
|
+
* */
|
|
309
|
+
libraryExport?: LibraryExport;
|
|
310
|
+
/**
|
|
311
|
+
* Configure how the library will be exposed.
|
|
312
|
+
* @deprecated Use output.library.type instead as we might drop support for output.libraryTarget in the future.
|
|
313
|
+
* */
|
|
314
|
+
libraryTarget?: LibraryType;
|
|
315
|
+
/**
|
|
316
|
+
* When using output.library.type: "umd", setting output.umdNamedDefine to true will name the AMD module of the UMD build.
|
|
317
|
+
* @deprecated Use output.library.umdNamedDefine instead.
|
|
318
|
+
*/
|
|
319
|
+
umdNamedDefine?: UmdNamedDefine;
|
|
320
|
+
/**
|
|
321
|
+
* Add a comment in the UMD wrapper.
|
|
322
|
+
* @deprecated use output.library.auxiliaryComment instead.
|
|
323
|
+
* */
|
|
324
|
+
auxiliaryComment?: AuxiliaryComment;
|
|
325
|
+
/**
|
|
326
|
+
* Output JavaScript files as module type.
|
|
327
|
+
* Disabled by default as it's an experimental feature. To use it, you must set experiments.outputModule to true.
|
|
328
|
+
* @default false
|
|
329
|
+
*/
|
|
330
|
+
module?: OutputModule;
|
|
331
|
+
/** Tell Rspack to remove a module from the module instance cache (require.cache) if it throws an exception when it is required. */
|
|
332
|
+
strictModuleExceptionHandling?: StrictModuleExceptionHandling;
|
|
333
|
+
/**
|
|
334
|
+
* Handle error in module loading as per EcmaScript Modules spec at a performance cost.
|
|
335
|
+
* @default false
|
|
336
|
+
* */
|
|
337
|
+
strictModuleErrorHandling?: StrictModuleErrorHandling;
|
|
338
|
+
/**
|
|
339
|
+
* When targeting a library, especially when library.type is 'umd', this option indicates what global object will be used to mount the library.
|
|
340
|
+
* @default 'self'
|
|
341
|
+
*/
|
|
342
|
+
globalObject?: GlobalObject;
|
|
343
|
+
/**
|
|
344
|
+
* The name of the native import() function.
|
|
345
|
+
* @default 'import'
|
|
346
|
+
* */
|
|
347
|
+
importFunctionName?: ImportFunctionName;
|
|
348
|
+
/**
|
|
349
|
+
* The name of the native import.meta object (can be exchanged for a polyfill).
|
|
350
|
+
* @default 'import.meta'
|
|
351
|
+
*/
|
|
352
|
+
importMetaName?: ImportMetaName;
|
|
353
|
+
/**
|
|
354
|
+
* Tells Rspack to add IIFE wrapper around emitted code.
|
|
355
|
+
* @default true
|
|
356
|
+
*/
|
|
357
|
+
iife?: Iife;
|
|
358
|
+
/**
|
|
359
|
+
* Option to set the method of loading WebAssembly Modules.
|
|
360
|
+
* @default 'fetch'
|
|
361
|
+
* */
|
|
362
|
+
wasmLoading?: WasmLoading;
|
|
363
|
+
/** List of wasm loading types enabled for use by entry points. */
|
|
364
|
+
enabledWasmLoadingTypes?: EnabledWasmLoadingTypes;
|
|
365
|
+
/**
|
|
366
|
+
* Specifies the filename of WebAssembly modules.
|
|
367
|
+
* @default '[hash].module.wasm'
|
|
368
|
+
* */
|
|
369
|
+
webassemblyModuleFilename?: WebassemblyModuleFilename;
|
|
370
|
+
/** The format of chunks (formats included by default are 'array-push' (web/webworker), 'commonjs' (node.js), 'module' (ESM). */
|
|
371
|
+
chunkFormat?: ChunkFormat;
|
|
372
|
+
/** The method to load chunks (methods included by default are 'jsonp' (web), 'import' (ESM), 'importScripts' (webworker), 'require' (sync node.js), 'async-node' (async node.js) */
|
|
373
|
+
chunkLoading?: ChunkLoading;
|
|
374
|
+
/** List of chunk loading types enabled for use by entry points. */
|
|
375
|
+
enabledChunkLoadingTypes?: EnabledChunkLoadingTypes;
|
|
376
|
+
/** Controls [Trusted Types](https://web.dev/articles/trusted-types) compatibility. */
|
|
377
|
+
trustedTypes?: true | string | TrustedTypes;
|
|
378
|
+
/**
|
|
379
|
+
* Configure how source maps are named.
|
|
380
|
+
* Only takes effect when devtool is set to 'source-map', which writes an output file.
|
|
381
|
+
* @default '[file].map[query]'
|
|
382
|
+
* */
|
|
383
|
+
sourceMapFilename?: SourceMapFilename;
|
|
384
|
+
/** The encoding to use when generating the hash. */
|
|
385
|
+
hashDigest?: HashDigest;
|
|
386
|
+
/**
|
|
387
|
+
* The prefix length of the hash digest to use.
|
|
388
|
+
* @default 20
|
|
389
|
+
* */
|
|
390
|
+
hashDigestLength?: HashDigestLength;
|
|
391
|
+
/**
|
|
392
|
+
* The hashing algorithm to use.
|
|
393
|
+
* @default 'md4'
|
|
394
|
+
* */
|
|
395
|
+
hashFunction?: HashFunction;
|
|
396
|
+
/** An optional salt to update the hash. */
|
|
397
|
+
hashSalt?: HashSalt;
|
|
398
|
+
/**
|
|
399
|
+
* Create async chunks that are loaded on demand.
|
|
400
|
+
* @default true
|
|
401
|
+
* */
|
|
402
|
+
asyncChunks?: AsyncChunks;
|
|
403
|
+
/**
|
|
404
|
+
* The new option workerChunkLoading controls the chunk loading of workers.
|
|
405
|
+
* @default false
|
|
406
|
+
* */
|
|
407
|
+
workerChunkLoading?: ChunkLoading;
|
|
408
|
+
/**
|
|
409
|
+
* Option to set the method of loading WebAssembly Modules in workers, defaults to the value of output.wasmLoading.
|
|
410
|
+
* @default false
|
|
411
|
+
* */
|
|
412
|
+
workerWasmLoading?: WasmLoading;
|
|
413
|
+
/** Set a public path for Worker, defaults to value of output.publicPath. */
|
|
414
|
+
workerPublicPath?: WorkerPublicPath;
|
|
415
|
+
/**
|
|
416
|
+
* This option allows loading asynchronous chunks with a custom script type.
|
|
417
|
+
* @default false
|
|
418
|
+
* */
|
|
419
|
+
scriptType?: ScriptType;
|
|
420
|
+
/** This option determines the module's namespace used with the output.devtoolModuleFilenameTemplate */
|
|
421
|
+
devtoolNamespace?: DevtoolNamespace;
|
|
422
|
+
/** This option is only used when devtool uses an option that requires module names. */
|
|
423
|
+
devtoolModuleFilenameTemplate?: DevtoolModuleFilenameTemplate;
|
|
424
|
+
/** A fallback is used when the template string or function above yields duplicates. */
|
|
425
|
+
devtoolFallbackModuleFilenameTemplate?: DevtoolFallbackModuleFilenameTemplate;
|
|
426
|
+
/**
|
|
427
|
+
* The Number of milliseconds before chunk request timed out.
|
|
428
|
+
* @default 120000
|
|
429
|
+
* */
|
|
430
|
+
chunkLoadTimeout?: number;
|
|
431
|
+
/**
|
|
432
|
+
* Add charset="utf-8" to the HTML <script> tag.
|
|
433
|
+
* @default true
|
|
434
|
+
* */
|
|
435
|
+
charset?: boolean;
|
|
436
|
+
/** Tell Rspack what kind of ES-features may be used in the generated runtime-code. */
|
|
437
|
+
environment?: Environment;
|
|
438
|
+
};
|
|
130
439
|
/**
|
|
131
440
|
* Path alias
|
|
132
441
|
* @example
|