1.0.7 • Published 2 years ago

laravel-mix-sri v1.0.7

Weekly downloads
40
License
MIT
Repository
github
Last release
2 years ago

Laravel Mix Subresource Integrity

Software License

A laravel mix 6.0 extension to generate integrity hashes on build for your assets.

For older version of mix, see v0.0.7

Installation

$ npm install laravel-mix-sri

Config

You can pass an object to the function. Available keys are:

  • enabled: boolean, default: mix.Inproduction()
  • algorithm: string, default: 'sha256'

Usage

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 mix-manifest.json.

You can use laravel-sri package to parse the mix-sri.json file and generate according attributes for your assets.

Contributing

Please see CONTRIBUTING for more details.

License

This project and The Laravel framework are open-sourced software licensed under the MIT license.

1.0.7

2 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.0-alpha

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

4 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago