Skip to content

Commit

Permalink
Upgrade SRI plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
nick committed Feb 8, 2021
1 parent def9dc5 commit 0b6340b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
2 changes: 1 addition & 1 deletion shop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"tailwindcss": "^1.9.5",
"typeface-lato": "^1.1.13",
"typeface-roboto": "^1.1.13",
"webpack-subresource-integrity": "^1.5.2",
"webpack-subresource-integrity": "^5.0.0-alpha.1",
"x-ray": "^2.3.4"
},
"babel": {
Expand Down
7 changes: 2 additions & 5 deletions shop/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require('dotenv').config()
const path = require('path')
const webpack = require('webpack')
const fs = require('fs')
const SriPlugin = require('webpack-subresource-integrity')
const { SubresourceIntegrityPlugin } = require('webpack-subresource-integrity')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const TerserPlugin = require('terser-webpack-plugin')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
Expand Down Expand Up @@ -194,10 +194,7 @@ const webpackConfig = {
new webpack.ProvidePlugin({
process: 'process/browser'
}),
new SriPlugin({
hashFuncNames: ['sha256', 'sha384'],
enabled: isProduction
}),
new SubresourceIntegrityPlugin(),
new HtmlWebpackPlugin({
template: 'public/template.html',
inject: false,
Expand Down
25 changes: 15 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24001,6 +24001,11 @@ type@^2.0.0:
resolved "https://registry.yarnpkg.com/type/-/type-2.1.0.tgz#9bdc22c648cf8cf86dd23d32336a41cfb6475e3f"
integrity sha512-G9absDWvhAWCV2gmF1zKud3OyC61nZDwWvBL2DApaVFogI07CprggiQAOOjvp2NRjYWFzPyu7vwtDrQFq8jeSA==

typed-assert@^1.0.4:
version "1.0.7"
resolved "https://registry.yarnpkg.com/typed-assert/-/typed-assert-1.0.7.tgz#30bb56ace265736fc3075b07414028077f77a8e2"
integrity sha512-TiBedJnGT3nNss19TyQ/JLwXy57pNDYBAja1gC0uLCKN4ps7FF3sSh71oImHDiKk8i5EuQ1G0CEOPeeA+ClWXQ==

[email protected], typedarray-to-buffer@^3.1.5:
version "3.1.5"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
Expand Down Expand Up @@ -25505,7 +25510,7 @@ webpack-merge@^5.7.3:
clone-deep "^4.0.1"
wildcard "^2.0.0"

webpack-sources@^1.1.0, webpack-sources@^1.3.0, webpack-sources@^1.4.3:
webpack-sources@^1.1.0, webpack-sources@^1.4.3:
version "1.4.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.4.3.tgz#eedd8ec0b928fbf1cbfe994e22d2d890f330a933"
integrity sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==
Expand All @@ -25521,17 +25526,17 @@ webpack-sources@^2.1.1:
source-list-map "^2.0.1"
source-map "^0.6.1"

webpack-subresource-integrity@^1.5.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-1.5.2.tgz#e40b6578d3072e2d24104975249c52c66e9a743e"
integrity sha512-GBWYBoyalbo5YClwWop9qe6Zclp8CIXYGIz12OPclJhIrSplDxs1Ls1JDMH8xBPPrg1T6ISaTW9Y6zOrwEiAzw==
webpack-subresource-integrity@^5.0.0-alpha.1:
version "5.0.0-alpha.1"
resolved "https://registry.yarnpkg.com/webpack-subresource-integrity/-/webpack-subresource-integrity-5.0.0-alpha.1.tgz#f6d036faaef1a0dfc1b5322342d1c611e0d08976"
integrity sha512-NjJpiTX5aSvp8SyCv9je9EUq3jOvTOsds0HQ9K+BjtpTe/mS//2D4SKuBl1WZnWIJdkzzwD5ciuf2ZPr+8eLbw==
dependencies:
webpack-sources "^1.3.0"
typed-assert "^1.0.4"

webpack@5.21.2:
version "5.21.2"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.21.2.tgz#647507e50d3637695be28af58a6a8246050394e7"
integrity sha512-xHflCenx+AM4uWKX71SWHhxml5aMXdy2tu/vdi4lClm7PADKxlyDAFFN1rEFzNV0MAoPpHtBeJnl/+K6F4QBPg==
webpack@5.20.2:
version "5.20.2"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.20.2.tgz#55a6e461e2a6e1ca7467a419886acf9c7b052d5f"
integrity sha512-gGPip54KK7DznaaPHVuNGqym3LAXXL+bPkZ9SlLTCdHmmk+m5x+D4UZdhWvw32CMahYlZwZYPsioFIw36/txYQ==
dependencies:
"@types/eslint-scope" "^3.7.0"
"@types/estree" "^0.0.46"
Expand Down

0 comments on commit 0b6340b

Please sign in to comment.