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

integrity isn't added to assets in loadable-stats.json #563

Closed
abnud1 opened this issue Apr 27, 2020 · 4 comments
Closed

integrity isn't added to assets in loadable-stats.json #563

abnud1 opened this issue Apr 27, 2020 · 4 comments
Labels

Comments

@abnud1
Copy link

abnud1 commented Apr 27, 2020

🐛 Bug Report

I'm having the same problem as this issue: #344

However a PR Was merged which solved this issue and in the past it worked, for some reason it now
doesn't work at all.

To Reproduce

Steps to reproduce the behavior:
1- install webpack-subresource-plugin and setup loadable components for SSR(webpack-plugin et all)
2- add the plugins in webpack config like this:

            new SriPlugin({
                hashFuncNames: ["sha256"],
                enabled: !isDevelopment,
            }),
            new LoadablePlugin(),

also add crossOriginLoading: "anonymous" to webpack.output.
3- build the bundle, in the generted loadable-stats.json you'll see no integrity attribute.
4- in the server bundle call chunkExtractor.getScriptTags({ crossorigin: "anonymous" }), you'll notice no integrity attribute

Expected behavior

chunkExtractor.getScriptTags(), chunkExtractor.getStyleTags(),
chunkExtractor.getLinkTags() would set integrity attribute.

npx envinfo --system --binaries --npmPackages @loadable/component,@loadable/server,@loadable/webpack-plugin,@loadable/babel-plugin --markdown --clipboard output:

## System:
 - OS: Windows 10 10.0.18363
 - CPU: (8) x64 Intel(R) Core(TM) i7-6700 CPU @ 3.40GHz
 - Memory: 1.27 GB / 7.89 GB
## Binaries:
 - Node: 14.0.0 - C:\Program Files\nodejs\node.EXE
 - npm: 6.14.4 - ~\AppData\Roaming\npm\npm.CMD

Other Information:
webpack version: 4.43
loadable-components version: 5.12
webpack-subresource-plugin version: 1.4.0

@stale
Copy link

stale bot commented Jun 26, 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.

@stale stale bot added the wontfix label Jun 26, 2020
@stale stale bot closed this as completed Jul 3, 2020
@jarrett-confrey
Copy link
Contributor

@abnud1 i am seeing this issue as well. were you able to figure out why this happens?

## System:
 - OS: macOS 11.4
 - CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
 - Memory: 61.25 MB / 16.00 GB
 - Shell: 5.8 - /bin/zsh
## Binaries:
 - Node: 14.16.0 - /usr/local/bin/node
 - Yarn: 1.22.10 - ~/my-app/node_modules/.bin/yarn
 - npm: 6.14.11 - /usr/local/bin/npm
 - Watchman: 4.9.0 - /usr/local/bin/watchman

Other Information:
webpack version: 5.33.2
loadable-components version: 5.14.2
webpack-subresource-integrity version: 1.5.2

@jarrett-confrey
Copy link
Contributor

i have created #803 in attempt to fix this issue

@theKashey
Copy link
Collaborator

Published as a part of:

  • @loadable/server@5.15.1
  • @loadable/webpack-plugin@5.15.1

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

No branches or pull requests

3 participants