Uh oh!
There was an error while loading. Please reload this page.
Switch to Preact - #12
Conversation
Just came from the linked Preact issue (sorry, was just taking a peek) but WMR does in fact come with prerendering right out of the box: https://github.com/preactjs/wmr/blob/91bc136e5c4a47c3ee3613e4d65183f4160ebe8e/packages/create-wmr/tpl/package.json#L2-L6 Linked is the pkg.json of the template that all new projects are created with. Prerendering is a flag but one we ship with. |
Thanks for taking a look @rschristian! :) I read the npm README and it suggested using preact-iso instead of Preact.render so I assumed there was no out-of-the-box way to pretender Preact apps with wmr. It might help others if the |
rschristian
commented
Mar 10, 2021
Ah, yeah. If you look that section has the header "Manual Installation and Setup". If you initialize with our template it is "out of the box" but I can see what you mean, the prerender functionality technically doesn't come with WMR itself. I guess it's a bit of a different setup, but |
will save us many kb
I considered using vite or wmr but
neither supports prerendering out of the boxso I went with preact-clicloses#9
TODO:
src/template.htmlwith oldpublic/index.html)switchscripttintscriptnodeLinker: node-moduleswhich installs tonode_modules/), see feat(cli): add monorepo and Yarn PnP support preactjs/preact-cli#1418class/className