isolated-externals-plugin
Advanced tools
Comparing version 2.4.3-fix-safari-private-cache-d09b245.1 to 2.5.0-fix-safari-private-cache-0834389.1
@@ -47,2 +47,7 @@ "use strict"; | ||
globalName: { type: 'string' }, | ||
urlTransformer: { type: 'string' }, | ||
includeImports: { | ||
type: ['string', 'array'], | ||
items: { type: 'string' }, | ||
}, | ||
}, | ||
@@ -122,5 +127,18 @@ }, | ||
finalIsolatedExternals = isolatedExternals.reduce((finalExternals, [entryName, exts]) => { | ||
const finalExts = Object.entries(exts).reduce((allExts, [packageName, ext]) => (Object.assign(Object.assign({}, allExts), { [packageName]: Object.assign(Object.assign({}, ext), { globalName: ext.globalName || | ||
const finalExts = Object.entries(exts).reduce((allExts, [packageName, ext]) => { | ||
const finalExt = Object.assign({}, ext); | ||
delete finalExt.includeImports; | ||
const packageConfig = Object.assign(Object.assign({}, finalExt), { globalName: ext.globalName || | ||
normalizedExistingExternals[packageName] || | ||
packageName }) })), {}); | ||
packageName }); | ||
const extraImports = Array.isArray(ext.includeImports) | ||
? ext.includeImports | ||
: ext.includeImports | ||
? [ext.includeImports] | ||
: []; | ||
const extraImportsConfig = extraImports.reduce((allImports, importName) => { | ||
return Object.assign(Object.assign({}, allImports), { [importName]: Object.assign({}, packageConfig) }); | ||
}, {}); | ||
return Object.assign(Object.assign(Object.assign({}, allExts), extraImportsConfig), { [packageName]: Object.assign({}, packageConfig) }); | ||
}, {}); | ||
return Object.assign(Object.assign({}, finalExternals), { [entryName]: finalExts }); | ||
@@ -127,0 +145,0 @@ }, {}); |
export interface ExternalInfo { | ||
url: string; | ||
globalName?: string; | ||
url: string; | ||
urlTransformer?: string; | ||
includeImports?: string | string[]; | ||
} | ||
@@ -6,0 +7,0 @@ export interface Externals { |
{ | ||
"name": "isolated-externals-plugin", | ||
"version": "2.4.3-fix-safari-private-cache-d09b245.1", | ||
"version": "2.5.0-fix-safari-private-cache-0834389.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123861
1654