preactjs-templates / material

The material design `preact-cli` template
MIT License
44 stars 20 forks source link

duplicate content in production build? #31

Closed olifink closed 3 years ago

olifink commented 3 years ago

Hi, I'm just trying out preact with this template. Works fine with npm run dev - plain vanilla, no changes in code.

However, I see duplicate content after npm run build && npm run serve on the home route:

https://user-images.githubusercontent.com/323250/126786973-4aaf18d3-251e-43c0-9b4a-d8d3e994cfb5.mp4

noobie? did I miss something obivous?

PS: it seems PRPL is somehow involved, if I run preact build --no-prerender this doesn't happen - but that's not really a solution if I want to have pre-render enabled

rschristian commented 3 years ago

You're seeing this as this template is very outdated, it's been deprecated for over a year now. You should've seen a message when initializing your project saying as much, see:

https://github.com/preactjs-templates/material/blob/17930eec1eb05a4aff21cf4978187336349079ec/template/package.json#L11

I notice we still have this listed in CLI's ReadMe though, that will be rectified shortly.

olifink commented 3 years ago

ah, ok... that wasn't very obvious... I'll work around that then

thanks

rschristian commented 3 years ago

Apologies for that.

Did you learn of this template through CLI's ReadMe? Just seeing if there's other references that need to be altered.

olifink commented 3 years ago

not a problem, would have saved some time - but ok. Yes, mainly here:

https://preactjs.com/cli/getting-started https://github.com/preactjs/preact-cli/blob/master/README.md

olifink commented 3 years ago

Also it would probably help if you'd mention it here in the readme or deprate the repo directly

https://github.com/preactjs-templates/material/blob/master/README.md

rschristian commented 3 years ago

Cool, the site has already been updated & fixed, CLI has a PR open.

You're right, definitely wouldn't hurt to put it in this ReadMe

Edit: Thanks, you're helping future users.