okkur / syna

Highly customizable open source theme for Hugo based static websites
https://syna.okkur.org/demo/
Apache License 2.0
251 stars 133 forks source link

JS not working past Hugo v76.5 #865

Open spearw opened 2 years ago

spearw commented 2 years ago

Is this a BUG REPORT or FEATURE REQUEST?: bug

What happened:

Updating Hugo past v76.5 gives __webpack_require__ error, and all the JS breaks. This looks like a known issue, so I won't go into it more.

What you expected to happen:

JS working

How to reproduce it (as minimally and precisely as possible):

Update Hugo past v76.5

Anything else we need to know?:

I want to update Hugo for some of their features to update my website. It seems like this is a longstanding issue with Syna, (I don't mind looking for a fix myself). Are there any leads that you have on fixing this issue so I don't have to start from ground 0? I will report back if I find a fix. Thanks!

Environment:

stp-ip commented 2 years ago

Known issue and PRs are welcome :) For now using Hugo v76.5 is the solution, if asset compilation is necessary. Pages without asset compilation should work with later versions as well.

spearw commented 2 years ago

Thanks for the response. This site I'm building is a side project for me, so the development is not progressing that quickly, but I was hoping you'd be able to point me in a direction for looking at updating Syna to be compatible with later versions with asset compilation. Thanks!

stp-ip commented 2 years ago

A bit more information here: https://github.com/okkur/syna/issues/847 As far as I could track it down until I ran into not having enough time was it being related with the difference between webpack 4 and 5. But couldn't pin it down to a specific thing.

stp-ip commented 2 years ago

Looking into it and will update here how far I got.

spearw commented 2 years ago

Great. Thank you.

stp-ip commented 2 years ago

Should have a few more specifics tomorrow I reckon.

stp-ip commented 2 years ago

Small update: Got it working with the latest Hugo version and think I know the culprit. Want to be sure on the whole issue before pushing it. Traveling next week, but afterwards should have a bit of time to finalize it.

spearw commented 2 years ago

That's excellent news!

spearw commented 2 years ago

Hey @stp-ip, any luck tracking down the culprit?

stp-ip commented 2 years ago

A few things came up 😅, but have it on my list for next week. 🤞

spearw commented 2 years ago

Super! I really appreciate this project and the work you're putting in.

stp-ip commented 2 years ago

Had quite a few urgent refugee projects take up our time. We or I will get back to this as soon as possible.

spearw commented 2 years ago

No worries. Thanks for letting me know.

ilgun commented 2 years ago

Subscribing to this one as well.

Natureshadow commented 2 years ago

I found out that disbaling JS minification works around the issue:

[minify]
disableJS = true

Thus, I think this issue came up with the bump of tdewolff/minify in Hugo 0.77.0.