Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interoperability with 'mini-css-extract-plugin' #178

Open
pixagraphic opened this issue Mar 28, 2022 · 1 comment
Open

Interoperability with 'mini-css-extract-plugin' #178

pixagraphic opened this issue Mar 28, 2022 · 1 comment

Comments

@pixagraphic
Copy link

Hi there,

I checked all the closed issues on this problem but I could not find a solution and didn't understand if this was fixed in any way.
I try to get SRI for <link> tags that are dynamically added by the min-css-extract-plugin. I tried to add them manually like this:

plugins: [
      new MiniCssExtractPlugin({
        attributes: {
          integrity: 'sha384-....',
          'crossorigin': 'anonymous'
        },
    new SubresourceIntegrityPlugin()
]

But now I'm not sure how to access the files hash at this point (sha384-....). Or maybe there is a smarter way of getting this to work? I'd be really glad if someone could assist, I already put a lot of time into this.

@yiluxiangbei87110
Copy link

Have you solved this problem yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants