How to remove Tailwind from a Phoenix project
There's a chance you have an existing Phoenix project that has been created with the default option of having TailwindCSS integrated, but you would like to go vanilla CSS.
Steps
Remove
:tailwind
frommix.exs
Remove related commands from
aliases
inmix.exs
(make sure to preserve anyesbuild
builds if you are using that).Remove
@import "tailwindcss/...
fromapp.css
Open
js/app.js
and addimport "../css/app.css"
to it.Delete file
/assets/tailwind.config.js
Remove block starting with
config :tailwind
fromconfig.exs
Remove
tailwind: {Tailwind, :install_and_run, [:default, ~w(--watch)]}
fromwatchers
insidedev.exs
Run
mix deps.clean --unlock --unused
You may have to fix layout related issues, how you render flash messages, and adjust core_components.exs.
Original solution found in
Elixir Forums
.
Last updated