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

Allow skipping chunks #185

Closed
wants to merge 3 commits into from
Closed

Allow skipping chunks #185

wants to merge 3 commits into from

Conversation

Christian24
Copy link

Hello,

This attempts to solve #176. We are trying to adapt module federation in our application. Since we are using this plugin, we cannot.

Since our federated modules are all loaded from our servers, but updated often, we decided it is okay to skip SRI generation for these as suggested here.

I am not very familiar with the inner workings of webpack or this plugin, so please do a very detailed review. I wrote a test for it, but I don't feel exactly comfortable and I might have just broken everything, but I wanted to help to get this off the ground, so hopefully this is useful.

Thanks a lot,
Christian

@jscheid
Copy link
Collaborator

jscheid commented Sep 15, 2022

Hi, thanks for putting this together. Unless I'm missing something it doesn't solve #176 however, it's ultimately a different feature--skipping SRI for certain chunks--that only happens to solve the use case for you?

Seen as a standalone feature it's one that nobody else has requested so far. It's also prone to accidental misuse, at least as implemented, since the trustworthiness of an origin may change over time.

With this in mind I'm reluctant to merge this. I assume it can serve as a temporary workaround for you without being part of an official release?

As for the actual issue at hand, support for federated modules, I had already started looking into it and I have a half-finished fix sitting here. It's difficult to find the time to finish it up especially because it's not a feature that we need ourselves at present, but let me try again in the near future to see how much work is left on it.

@Christian24
Copy link
Author

Sorry for the late response.

Hi, thanks for putting this together. Unless I'm missing something it doesn't solve #176 however, it's ultimately a different feature--skipping SRI for certain chunks--that only happens to solve the use case for you?

As I said this was also brought up here.

Seen as a standalone feature it's one that nobody else has requested so far. It's also prone to accidental misuse, at least as implemented, since the trustworthiness of an origin may change over time.

I agree that this can be dangerous. However, it's valid that remotes change while the host doesn't, hence skipping those chunks.

With this in mind I'm reluctant to merge this. I assume it can serve as a temporary workaround for you without being part of an official release?

Fair enough. I think for us the temporary workaround is just not using this plugin at all for the particular application that uses federated modules as the trustworthiness of our origins doesn't change.

As for the actual issue at hand, support for federated modules, I had already started looking into it and I have a half-finished fix sitting here. It's difficult to find the time to finish it up especially because it's not a feature that we need ourselves at present, but let me try again in the near future to see how much work is left on it.

I am glad to hear that. Thanks for putting so much work into it. I am keen to try it. ;)

I guess I am going to close this now then?

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

Successfully merging this pull request may close these issues.

None yet

2 participants