mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
Merge pull request #24286 from jambonsw/add_hash_options_to_webpack
webpack: Add hash options to config
This commit is contained in:
Vendored
+7
-1
@@ -134,7 +134,7 @@ declare namespace webpack {
|
||||
}
|
||||
|
||||
interface Output {
|
||||
/** The output directory as absolute path (required). */
|
||||
/** The output directory as absolute path. */
|
||||
path?: string;
|
||||
/** The filename of the entry chunk as relative path inside the output.path directory. */
|
||||
filename?: string;
|
||||
@@ -190,8 +190,14 @@ declare namespace webpack {
|
||||
sourcePrefix?: string;
|
||||
/** This option enables cross-origin loading of chunks. */
|
||||
crossOriginLoading?: string | boolean;
|
||||
/** The encoding to use when generating the hash, defaults to 'hex' */
|
||||
hashDigest?: 'hex' | 'latin1' | 'base64';
|
||||
/** The prefix length of the hash digest to use, defaults to 20. */
|
||||
hashDigestLength?: number;
|
||||
/** Algorithm used for generation the hash (see node.js crypto package) */
|
||||
hashFunction?: string | ((algorithm: string, options?: any) => any);
|
||||
/** An optional salt to update the hash via Node.JS' hash.update. */
|
||||
hashSalt?: string;
|
||||
/** An expression which is used to address the global object/scope in runtime code. */
|
||||
globalObject?: string;
|
||||
}
|
||||
|
||||
Vendored
+10
-2
@@ -126,9 +126,9 @@ declare namespace webpack {
|
||||
}
|
||||
|
||||
interface Output {
|
||||
/** The output directory as absolute path (required). */
|
||||
/** The output directory as absolute path */
|
||||
path?: string;
|
||||
/** The filename of the entry chunk as relative path inside the output.path directory. */
|
||||
/** (Required) The filename of the entry chunk as relative path inside the output.path directory. */
|
||||
filename?: string;
|
||||
/** The filename of non-entry chunks as relative path inside the output.path directory. */
|
||||
chunkFilename?: string;
|
||||
@@ -182,6 +182,14 @@ declare namespace webpack {
|
||||
sourcePrefix?: string;
|
||||
/** This option enables cross-origin loading of chunks. */
|
||||
crossOriginLoading?: string | boolean;
|
||||
/** The encoding to use when generating the hash, defaults to 'hex' */
|
||||
hashDigest?: 'hex' | 'latin1' | 'base64';
|
||||
/** The prefix length of the hash digest to use, defaults to 20. */
|
||||
hashDigestLength?: number;
|
||||
/** Algorithm used for generation the hash (see node.js crypto package) */
|
||||
hashFunction?: string | ((algorithm: string, options?: any) => any);
|
||||
/** An optional salt to update the hash via Node.JS' hash.update. */
|
||||
hashSalt?: string;
|
||||
}
|
||||
|
||||
interface BaseModule {
|
||||
|
||||
@@ -100,7 +100,9 @@ configuration = {
|
||||
path: path.join(__dirname, "assets", "[hash]"),
|
||||
publicPath: "assets/[hash]/",
|
||||
filename: "output.[hash].bundle.js",
|
||||
chunkFilename: "[id].[hash].bundle.js"
|
||||
chunkFilename: "[id].[hash].bundle.js",
|
||||
hashFunction: 'sha256',
|
||||
hashDigestLength: 64,
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user