Skip to content
On this page

💨 Tailwind CSS in servemon?

Yeah you heard right, you can easily use Tailwind CSS with servemon. You only need to configure it in servemon.config.js

WARNING

Servemon can be slower than normal when you are using Tailwind CSS. It can take up to 900ms instead of just 10ms.

Getting Started

So in your servemon.config.js file you can configure your Tailwind CSS settings.

tailwind: {
  enabled: true,
  watch: true,
  pkgManager: "PACKAGE MANAGER",
  input: "./FOLDER/CSS_FILE.css",
  output: "./FOLDER/CSS_FILE.css",
},
1
2
3
4
5
6
7

So yeah that was some configuration. Now we will teach you the tailwid values.

  • enabled: true
    • This is the main setting. If you set it to false, you will not use Tailwind CSS.
  • watch: true
    • This is telling tailwind to watch for changes in your files
  • pkgManager: "PACKAGE MANAGER"
    • This is the package manager you use to run the tailwind command. (pnpx, npx & etc)
  • input: "./FOLDER/CSS_FILE.css"
    • This is the input file. This file is where you use tailwind classes or custom styles
  • output: "./FOLDER/CSS_FILE.css"
    • This is the output file. This file is where you will get the compiled CSS

So how do i run this with servemon? Simply add the --tailwind flag to the servemon dev command

servemon dev --tailwind
1