Skip to content

Commit

Permalink
refactor(plugin-legacy): optimize cspHashes array (#11734)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepower authored Jan 18, 2023
1 parent 00a79ec commit b1a8e58
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/plugin-legacy/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -797,10 +797,10 @@ function wrapIIFEBabelPlugin(): BabelPlugin {
}

export const cspHashes = [
createHash('sha256').update(safari10NoModuleFix).digest('base64'),
createHash('sha256').update(systemJSInlineCode).digest('base64'),
createHash('sha256').update(detectModernBrowserCode).digest('base64'),
createHash('sha256').update(dynamicFallbackInlineCode).digest('base64'),
]
safari10NoModuleFix,
systemJSInlineCode,
detectModernBrowserCode,
dynamicFallbackInlineCode,
].map((i) => createHash('sha256').update(i).digest('base64'))

export default viteLegacyPlugin

0 comments on commit b1a8e58

Please sign in to comment.