mattwaler / tea-stack

A starter template for the TEA stack (Tailwind, Eleventy, Alpine).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snowpack instead of Webpack?

joakim opened this issue · comments

Have you considered Snowpack? Seems like a nice fit for this project.

Hello @joakim!

That's an interesting idea! I've thought about it, but ultimately decided against snowpack because of a few reasons:

  • Snowpack aims to solve bloated JS bundling issues in development, but this project does not have this problem as it relies very heavily on template-driven development
  • The two bundle files (main.bundle.js and main.bundle.css) rarely change, as most of your changes in development will be achieved in a template via Tailwind and Alpine
  • As far as I know (which might be wrong), Snowpack's "dev server" is actually a SPA and it's process does not mesh well with Eleventy as we're actually compiling the templates to static HTML, even in development mode

Basically, snowpack solves a problem that traditional React and Vue apps have, but we've solved that problem by utilizing all the elements of this project ourselves!

However, I'm happy to review a PR replacing Webpack with Snowpack if you can get things working in a predictable and simplistic manner! I can't say I'll end up merging it, but I'd love to see if it's possible.

Fair enough! Thanks for explaining your rationale.