eclark

eclark

Tailwind CSS and Webpack 5 HOWTO

I’ve been working on a phoenix project lately and I wanted to use the latest versions of everything. Webpack 5 had some breaking changes and upgrading it was interesting. That lead me to write up a post on it. https://www.batteriesincl.com/posts/phoenix-modern-tailwind-webpack5

So if you’re looking for how to use Phoenix with Webpack 5 and Tailwind take a look and let me know if you have other questions. Thanks

First Post!

Kry

Kry

Heya you’ve really done a great job in your blog post so thanks alot for sharing. I have it all set up but for some reason the class don’t have any effect on what’s displayed on the page. I get the intellisense and stuff for tailwind but classes i add don’t change anything. Do you have any idea what i might be missing?

Last Post!

eclark

eclark

I’ve seen some issues with getting previously unused tailwind classes to live refresh. I found that restarting the Webpack process (I restarted the phoenix server) and then hard-refreshing the browser window fixed most issues. After the class was used by at least one template, everything worked.

Where Next?

Popular in Guides/Tuts Top

dogweather
I just finished a long process of configuring and debugging a Docker Compose-based dev environment. Several late-night hours! I think I’v...
New
niku
I write an article Parameterized testing with ExUnit.The key concept is using ExUnit.Case.register_test/4 such as ExUnit.start() defmod...
New
magnetic
Hey :waving_hand:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and ...
New
berts-4865
Here is a quick guide to uploading a file from the browser to DO spaces. It is crude, but will hopefully save sometime time and frustrat...
New
marcin
This post is intended to be a guide for others, I was running a remote debugger for the first time and appreciate feedback on how I could...
New
kuon
I have a page with a large state that is loaded from DB, let’s call that “data”. I have a root live view that load “data” on mount and r...
New
slouchpie
Warmest greetings, comrades. I recently started using :dns_cluster (GitHub - phoenixframework/dns_cluster: Simple DNS clustering for dis...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 55125 245
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 40165 209
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement