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

Error loading dynamic modules in frames in Webpack 5 #15

Closed
twschiller opened this issue Jun 8, 2021 · 5 comments · Fixed by #17
Closed

Error loading dynamic modules in frames in Webpack 5 #15

twschiller opened this issue Jun 8, 2021 · 5 comments · Fixed by #17

Comments

@twschiller
Copy link

twschiller commented Jun 8, 2021

Thanks for your work on this extension! We're seeing problems with dynamic imports failing for iframes with Webpack 5. I think the problematic line might be:

https://github.com/crimx/webpack-target-webextension/blame/49b43992aafd53faf6493cbd33ba54e289ba3078/lib/background.js#L13

This should probably be sender.frameId? The sender.tab.frameId expression is undefined.

I am curious as to how this was working previously as that line has been there over a year. Maybe Chrome recently changed what's passed with sender.tab? In the MDN documentation the tab https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/runtime/MessageSender won't have a frameId

@Jack-Works
Copy link
Member

I am curious as to how this was working previously as that line has been there over a year.

I think it never worked before. I rarely handle with content script within the iframe

@twschiller
Copy link
Author

twschiller commented Jun 12, 2021

It did for at least 3-4 months. We have a client on Chrome using some functionality that depends on it - they started reporting problems for some their teammates last week, which makes me think it's related to a gradual rollout of a Chrome version

@crimx
Copy link
Member

crimx commented Jun 12, 2021

I see. Better support the old API as well.

@twschiller
Copy link
Author

I see. Better support the old API as well.

You shouldn't need to -- sender always had the frameId with it (that's what we use in our extension in places). It's just that tab might have also had the frameId with it in Chrome

crimx added a commit that referenced this issue Jun 12, 2021
@crimx
Copy link
Member

crimx commented Jun 12, 2021

Got it. Thanks for the input.

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 a pull request may close this issue.

3 participants