Removed a deprecated createURL function reference.

This commit is contained in:
Krzysztof Kotowicz 2019-10-18 16:19:11 +02:00
parent f3eb1bce51
commit c816c135ca
4 changed files with 14 additions and 1 deletions

View File

@ -753,6 +753,10 @@ export type OptimizationSplitChunksGetCacheGroups = (
| OptimizationSplitChunksCacheGroup
| OptimizationSplitChunksCacheGroup[]
| void;
/**
* The name of the trusted types policy created by webpack to serve bundle chunks. Defaults to 'webpack'.
*/
export type TrustedTypesPolicyName = string;
/**
* Options object as provided by the user.
@ -3038,6 +3042,10 @@ export interface OutputNormalized {
* Handles exceptions in module loading correctly at a performance cost (Deprecated). This will handle module error compatible with the Node.js CommonJS way.
*/
strictModuleExceptionHandling?: StrictModuleExceptionHandling;
/**
* The name of the trusted types policy created by webpack to serve bundle chunks. Defaults to 'webpack'.
*/
trustedTypesPolicyName?: TrustedTypesPolicyName;
/**
* A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
*/

View File

@ -713,6 +713,7 @@ const applyOutputDefaults = (
D(output, "hashFunction", "md4");
D(output, "hashDigest", "hex");
D(output, "hashDigestLength", 20);
D(output, "trustedTypesPolicyName", "webpack");
D(output, "strictModuleExceptionHandling", false);
const optimistic = v => v || v === undefined;

View File

@ -2,7 +2,6 @@ it("should use default trusted types policy name", function() {
// emulate trusted types in a window object
const noop = (i) => i
const rules = {
createURL: noop,
createScriptURL: noop,
}
window.trustedTypes = {

5
types.d.ts vendored
View File

@ -7937,6 +7937,11 @@ declare interface OutputNormalized {
*/
strictModuleExceptionHandling?: boolean;
/**
* The name of the trusted types policy created by webpack to serve bundle chunks. Defaults to 'webpack'.
*/
trustedTypesPolicyName?: string;
/**
* A unique name of the webpack build to avoid multiple webpack runtimes to conflict when using globals.
*/