How to write WordPress Themes with SASS, TypeScript, and HMR
Not interested in all the details? I shared a twentytwenty child theme with SASS, TypeScript, and HMR applying all the ideas in this post that you can use as a starting point.
Modern front-end developer experience is nicer than the one we had in 2007 when WordPress came out.
- CSS preprocessors help you reduce boilerplate and reuse mixins.
- TypeScript minimizes runtime errors with its type-checking and IDE auto-completion.
- The latest syntactic sugar from ECMAScript drafts makes your code simpler.
- Partial content refresh when files change with HMR enables a seamless experience.
In this post I will guide you through all the steps required to add SASS, TypeScript, and HMR support to any WordPress theme.Read more →