Skip to content

Fix prerender deletes <html> attributes - #651

Open
marvinhagemeister wants to merge 5 commits into
mainfrom
prerender-worker
Open

marvinhagemeister wants to merge 5 commits into
mainfrom
prerender-worker

Conversation

@marvinhagemeister

Copy link
Copy Markdown
Member

Fixes #593

@changeset-bot

changeset-bot Bot commented May 30, 2021 •

Copy link
Copy Markdown

🦋 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

});
}

async function workerCode({ cwd, out, publicPath }) {

Copy link
Copy Markdown
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

github-actions Bot commented May 30, 2021 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown

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

3 participants