question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support SRI on webpack-plugin

See original GitHub issue

🚀 Feature Proposal

Putting an integrity string for SRI into loadable-stats.json when building bundles.

Motivation

To embed integrity attribute for each script tag when running SSR application with loadable components, I need to read the file and compute the integrity value on runtime. Instead of that, I would like to compute the integrity value at the building phase to reduce overhead on runtime.

Example

Putting integrity value into loadable-stats.json

{
      "name": "xxx-e63d1f6f130186a006da.js",
      "size": 782370,
      "integrity": "sha384-oqVuAfXRKap7fdgcCY5uykM6+R9GqQ8K/uxy9rx7HNQlGYl1kPzQho1wx4JwY8wC", 
      "chunks": [],
      "chunkNames": [],
      "emitted": false
},

Then it could be great if we can access the value on attrFn for getScriptTags

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yayoccommented, May 29, 2019

I agree with loading the plugin as optional for the first step since integrity seems not so high demand. @neoziro

0reactions
stale[bot]commented, Jan 9, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support SRI on webpack-plugin · Issue #344 - GitHub
I am not sure if webpack has a plan. Currently, I only know this plugin to generate integrity. Do you think if loadable...
Read more >
sri-stats-webpack-plugin - npm
Subresource integrity hash generator plugin for webpack.. Latest version: 0.7.3, last published: 6 years ago.
Read more >
Webpack-subresource-integrity - npm.io
Webpack plugin for enabling Subresource Integrity. Subresource Integrity (SRI) is a security feature that enables browsers to verify that files they fetch (for ......
Read more >
Top 5 webpack-subresource-integrity Code Examples - Snyk
To help you get started, we've selected a few webpack-subresource-integrity examples, based on popular ways it is used in public projects.
Read more >
Webpack for SRI rules - Stack Overflow
It hasn't been updated in a few years. If I have a webpack.config.js with plugins: plugins: [ new MiniCssExtractPlugin({ filename: 'css/[name].[ ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found