Laravel Mix Subresource Integrity
A laravel mix 6.0 extension to generate integrity hashes on build for your assets.
For older version of mix, see v0.0.7
$ npm install laravel-mix-sri
You can pass an object to the function. Available keys are:
enabled: boolean, default:
algorithm: string, default:
let mix = require('laravel-mix') require('laravel-mix-sri') mix.sass('src/app.sass', 'dist') .js('src/app.js', 'dist') .generateIntegrityHash()
At every build it'll generate (or update the content of) a
mix-sri.json file. The file is located within the
public directory with the
You can use laravel-sri package to parse the
mix-sri.json file and generate according attributes for your assets.
Please see CONTRIBUTING for more details.
This project and The Laravel framework are open-sourced software licensed under the MIT license.