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

Fix broken editor.js prefetch #2890

Merged
merged 1 commit into from
Apr 9, 2024
Merged

Fix broken editor.js prefetch #2890

merged 1 commit into from
Apr 9, 2024

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Apr 9, 2024

In index.html there are a couple prefetch and prerender statements:

#1838

But this one was not working well in the bundled version:

<link rel="prefetch" as="script" type="text/javascript" href="editor.js">

Parcel would take this as an entry point to bundle editor.js, but somehow it produces a different file than the one loaded in the bundled editor.html. This was producing an extra 1.5MB js file that was only prefetched in index.html, but never imported.

I tried some things to make the prefetch point to the correct import, but it didn't work.

The editor.html prerender should make sure that the correct JS asset gets prefetched.

@fonsp fonsp added frontend Concerning the HTML editor performance labels Apr 9, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="editor-js-prefetch")
julia> using Pluto

@fonsp fonsp merged commit 91b17ff into main Apr 9, 2024
3 checks passed
@fonsp fonsp deleted the editor-js-prefetch branch April 9, 2024 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Concerning the HTML editor performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant