This is an example of a simple Phoenix Framework setup for tailwindcss v2.0. It also includes the recommend production setup to purge unused class name from production build.
A list of changes that are made to the default phoenix template.
postcss-loader
to webpack.config.js
[email protected]
and config PurgeCSS
to watch for template files under lib/**/*.eex
@tailwindcss/aspect-ratio
, @tailwindcss/forms
, and @tailwindcss/typography
for those who are using tailwindui
To start your Phoenix server:
mix deps.get
mix ecto.setup
npm install
inside the assets
directorymix phx.server
Now you can visit localhost:4000
from your browser.
Ready to run in production? Please check our deployment guides.