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

CDN Loading can break when script tags use defer #57

Open
qdot opened this issue Feb 21, 2021 · 0 comments
Open

CDN Loading can break when script tags use defer #57

qdot opened this issue Feb 21, 2021 · 0 comments
Assignees
Labels
bug Something isn't working WASM WASM layer for js/ts

Comments

@qdot
Copy link
Member

qdot commented Feb 21, 2021

Describe the bug

  1. Create an HTML page that loads the CDN buttplug distro, uses defer in the script tag, and has other includes from different domains after it.

Expected behavior
Things load fine

Actual behavior
Chunks can't be found because they end up with the domain of the last script tag

Additional context
The publicpath override for webpack tries to load the URL of the last script tag, but if defer is used, all tags are loaded before script tags actually fetch their scripts. This means we'll take the URL of whatever the content for the last script tag is.

@qdot qdot added bug Something isn't working WASM WASM layer for js/ts labels Feb 21, 2021
@qdot qdot self-assigned this Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working WASM WASM layer for js/ts
Projects
None yet
Development

No branches or pull requests

1 participant