waysact / webpack-subresource-integrity

Webpack plugin for enabling Subresource Integrity.
MIT License
357 stars 46 forks source link

Issue with Terser Plugin using banner #139

Closed edwinbadillo closed 3 years ago

edwinbadillo commented 3 years ago

It seems the SRI value is being generated before the terser plugin adds the banner. Following standard properties to separate license copy as per webpack documentation. https://webpack.js.org/plugins/terser-webpack-plugin/#banner

webpack-subresource-integrity 1.5.2 terser-webpack-plugin 5.0.3 webpack 5.4.0

jscheid commented 3 years ago

Thanks for the bug report. This is going to be fixed in the upcoming 5.0 branch. I'm planning to release a first alpha version in the course of next week.

jscheid commented 3 years ago

I've now released version 5.0.0-alpha.1, see https://github.com/waysact/webpack-subresource-integrity/issues/144

@edwinbadillo there's a test case for your issue so it should work for you: https://github.com/waysact/webpack-subresource-integrity/tree/next/examples/terser-banner

Closing this, feel free to reopen if there's still a problem.