@@ -59,6 +59,20 @@ default), the `integrity` attribute will be set automatically. The
5959` output.crossOriginLoading ` webpack option. There is nothing else to
6060be done.
6161
62+ #### With MiniCssExtractPlugin
63+
64+ Currently, developers can only add integrity to link elements via the insert method.
65+
66+ ``` js
67+ new MiniCssExtractPlugin ({
68+ insert : (link ) => {
69+ link .integrity =
70+ __webpack_require__ .sriHashes [chunkId + " _css/mini-extract" ];
71+ document .head .appendChild (link);
72+ },
73+ })
74+ ```
75+
6276#### With HtmlWebpackPlugin({ inject: false })
6377
6478When you use html-webpack-plugin with ` inject: false ` , you are
@@ -221,7 +235,7 @@ With Webpack and long-term caching this means using `[contenthash]` (with
221235` [contenthash] ` with ` realContentHash ` disabled, or using a different type of
222236hash placeholder (such as ` [chunkhash] ` ) provides weaker guarantees, which is
223237why this plugin will output a warning in these cases. See [ issue
224- #162 ] ( https://github.com/waysact/webpack-subresource-integrity/issues/162 )
238+ # 162] ( https://github.com/waysact/webpack-subresource-integrity/issues/162 )
225239for more information.
226240
227241### Proxies
@@ -251,7 +265,7 @@ tags, but preloading with SRI doesn't work as expected in current
251265Chrome versions. The resource will be loaded twice, defeating the
252266purpose of preloading. This problem doesn't appear to exist in
253267Firefox or Safari. See [ issue
254- #111 ] ( https://github.com/waysact/webpack-subresource-integrity/issues/111 )
268+ # 111] ( https://github.com/waysact/webpack-subresource-integrity/issues/111 )
255269for more information.
256270
257271### Browser support
@@ -275,7 +289,7 @@ using a tool such as [`http-server`](https://github.com/indexzero/http-server).
275289### Safari 13 (and earlier versions) and Assets that Require Cookies
276290
277291As detailed in [ Webpack Issue
278- #6972 ] ( https://github.com/webpack/webpack/issues/6972 ) , the ` crossOrigin `
292+ # 6972] ( https://github.com/webpack/webpack/issues/6972 ) , the ` crossOrigin `
279293attribute can break loading of assets in Safari versions prior to 14 in certain
280294edge cases due to a browser bug. Since SRI requires the ` crossOrigin ` attribute
281295to be set, you may run into this case even when source URL is same-origin with
0 commit comments