Enabling experimental sri module.
experimental: {
sri: {
algorithm: 'sha256'
}
},
It generates the subresource integrity manifest files, but doesn't inject the integrity attribute within the build.
We were expecting to see an integrity attribute within the script tag. For Example:
<script integrity="kjkdjkdjkjaaaldks="/>
but was getting within the built html
<script />
I had the same question, unfortunately it is not possible to have SRI on the scripts that next js generated by itself. I cite: "Currently webpack chunks loaded via flight runtime do not get integrity hashes."