DEV Community

Tammy Shipps
Tammy Shipps

Posted on

1

Webpack 5 in Craft CMS 3? Coming right up!

Webpack 5 has been out for several weeks now and has several new features and changes that I very much wanted to work with and make use of in a Craft CMS 3 project I maintain.

However, when an update with breaking changes comes out, it can be an absolute bear getting all of your dependencies to play together nicely.

(Sometimes it can even be impossible until other dependency package maintainers can get to updating their own code.)

Generally, I like to use boilerplates to kickstart my projects, but some of these updates are so new that I wasn't able to find one that both worked correctly and suited my needs.

Since I couldn't find one, I created a new boilerplate with Webpack 5, PostCSS 8, Tailwind 2, and HMR for your development environment. (It also contains goodies like Sass and Babel, of course.)

It tries to make little-to-no assumptions about your project; only what it needs to in order to function.

https://github.com/mizziness/craft3-webpack5-tailwind2-boilerplate

PRs and constructive feedback are always welcome!

Heroku

Build apps, not infrastructure.

Dealing with servers, hardware, and infrastructure can take up your valuable time. Discover the benefits of Heroku, the PaaS of choice for developers since 2007.

Visit Site

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay