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

"defer" keyword in webpack causing OZui unavailability issues (e.g. leaf image missing from non-sponsorable site) #801

Closed
hyanwong opened this issue Apr 16, 2024 · 5 comments

Comments

@hyanwong
Copy link
Member

E.g. https://beta.onezoom.org/sponsor_leaf?form_reservation_code=2e4435a2a96&lang=&ott=417422

There's a big missing space in the middle of the page, e.g. below:

Screenshot 2024-04-16 at 18 43 52
@hyanwong hyanwong changed the title Example leaf image missing from non-sponsor able site Example leaf image missing from non-sponsorable site Apr 16, 2024
@hyanwong
Copy link
Member Author

Probably due to this:

Screenshot 2024-04-16 at 18 45 24

@hyanwong
Copy link
Member Author

This is because the static/OZTreeModule/dist/OZui.html file is loaded using the defer keyword:

<head><script defer src="/OZtree/static/OZTreeModule/dist/OZui.83aa665bad39b4c01d34.js"></script></head>

I'm not even sure that the <head> should be in there either, see #802

@hyanwong hyanwong changed the title Example leaf image missing from non-sponsorable site "defer" keyword in webpack causing issues (e.g. leaf image missing from non-sponsorable site) Apr 16, 2024
@hyanwong hyanwong changed the title "defer" keyword in webpack causing issues (e.g. leaf image missing from non-sponsorable site) "defer" keyword in webpack causing OZui unavailability issues (e.g. leaf image missing from non-sponsorable site) Apr 16, 2024
@hyanwong
Copy link
Member Author

hyanwong commented Apr 16, 2024

And I can't even figure out where the "defer" is coming from. It's not in the template (and neither is <head>):

<script class="" src="<%= htmlWebpackPlugin.files.chunks[chunk].entry %>"></script>

@hyanwong
Copy link
Member Author

Well, adding scriptLoading: 'blocking', to web pack config seems to restore the old behaviour

@hyanwong
Copy link
Member Author

Fixed by #803

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

No branches or pull requests

1 participant