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

webpack-assets-manifest support #23

Closed HellRok closed 4 years ago

HellRok commented 5 years ago

Hi,

We've had a business need for integrity checks of javascript and are looking to use this library to support that https://github.com/webdeveric/webpack-assets-manifest Sadly minipacker does not support the manifest output when enabling the integrity options.

The format used to be:

{
  "admin.js": "admin-bundle.js",
}

but is now:

{
  "admin.js": {
    "src": "admin-bundle.js",
    "integrity": "sha512-4IcloDmtFg4ZQCeG9jbWKpa80042xfgvxjlbTRGpSbdFTKE2rA4JfW3UlcgSHXkhE+ItRYGCCrIf2JGHqhJ21Q=="
  }
}

We're happy to write the code to support this along side the usual format but just wanted to check if that's a feature you want or even would accept into the project.

Thanks, Sean

nikushi commented 5 years ago

Thank you for opening the issue. It looks nice. I don't use webpack-assets-manifest plugin in my projects though, I think that it would be great if minipack supports the integrity option that the webpack-assets-manifest has.

If you intend to send a PR, that is very welcome. I will review it!

nikushi commented 4 years ago

resolved by https://github.com/nikushi/minipack/pull/25