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 prerender deletes <html> attributes #651

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

marvinhagemeister
Copy link
Member

Fixes #593

@changeset-bot
Copy link

changeset-bot bot commented May 30, 2021

🦋 Changeset detected

Latest commit: 0b1cb6f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wmr Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@@ -44,178 +42,3 @@ export function prerender({ cwd = '.', out = '.cache', publicPath }) {
w.once('exit', resolve);
});
}

async function workerCode({ cwd, out, publicPath }) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diff looks a lot larger due to moving this function into a separate file.

@github-actions
Copy link
Contributor

github-actions bot commented May 30, 2021

Size Change: -1.05 kB (0%)

Total Size: 779 kB

Filename Size Change
examples/demo/dist/about/index.html 706 B -6 B (-1%)
examples/demo/dist/alias-outside/index.html 683 B -9 B (-1%)
examples/demo/dist/class-fields/index.html 693 B -10 B (-1%)
examples/demo/dist/compat/index.html 1.58 kB -10 B (-1%)
examples/demo/dist/env/index.html 766 B -12 B (-2%)
examples/demo/dist/error/index.html 698 B -10 B (-1%)
examples/demo/dist/files/index.html 729 B -11 B (-1%)
examples/demo/dist/index.html 756 B -14 B (-2%)
examples/demo/dist/json/index.html 703 B -7 B (-1%)
examples/demo/dist/lazy-and-late/index.html 705 B -8 B (-1%)
packages/wmr/wmr.cjs 722 kB -956 B (0%)
ℹ️ View Unchanged
Filename Size Change
examples/demo/dist/assets/Calendar.********.css 702 B 0 B
examples/demo/dist/assets/style.********.css 624 B 0 B
examples/demo/dist/chunks/alias-outside.********.js 137 B 0 B
examples/demo/dist/chunks/class-fields.********.js 211 B 0 B
examples/demo/dist/chunks/compat.********.js 15.4 kB 0 B
examples/demo/dist/chunks/hoofd.module.********.js 1.46 kB 0 B
examples/demo/dist/chunks/index.********.js 304 B 0 B
examples/demo/dist/chunks/json.********.js 237 B 0 B
examples/demo/dist/chunks/meta-tags.********.js 299 B 0 B
examples/demo/dist/chunks/prerender.********.js 293 B 0 B
examples/demo/dist/index.********.js 7.65 kB 0 B
examples/demo/dist/meta-tags/index.html 778 B 0 B
packages/wmr/jest-puppeteer.config.cjs 164 B 0 B
packages/wmr/prerender-worker.cjs 20.9 kB 0 B

compressed-size-action

if (!hasTitle) {
// TODO: TS types of posthtml seem to be wrong
// @ts-ignore
node.content?.unshift({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

breaks in Node 12

Suggested change
node.content?.unshift({
node.content && node.content.unshift({

@danielweck
Copy link

Hello :)
I see that @developit added the comment "breaks in Node 12" on 30 May 2021. Is that the only blocker for this PR to be merged?
Issue #593 currently prevents me from using Hoofd ( https://github.com/JoviDeCroock/hoofd ) useLang() :(
Thank you all! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants