nikushi / minipack

Minipack, a gem for minimalists, which can integrates Rails with webpack. It is an alternative to Webpacker.
MIT License
115 stars 22 forks source link

Add support for integrity attribute when using experimental splitChunks #27

Closed jochamb closed 4 years ago

jochamb commented 4 years ago

recently ported over from a dated legacy webpack config to using minipack and its great how customizable it is. took some time to add support for integrity attributes when using the splitChunks feature in webpack4.

all chunks that are nested within entrypoints have a top-level reference containing the integrity attribute when true in https://github.com/webdeveric/webpack-assets-manifest#integrity.

then can search the manifest for that top-level reference to get the attribute and then pass it to the rails asset helper

tried to stick with the code style of the repository, let me know if theres any missing test cases you'd like to see and i can add those.

nikushi commented 4 years ago

Thank you for sending a pull request. I have no time to check in a few days. I will check in the weekends.

nikushi commented 4 years ago

Let me fix my suggestion.

nikushi commented 4 years ago

released as v0.3.4. Thank you 👍

jochamb commented 4 years ago

Hey sorry I missed these messages, thank you for fixing and merging!

nikushi commented 4 years ago

NP :+1: Thank you for great contribution!