Skip to content

SW01001: Invalid property prefix

The prefix, tailwindPrefix, or themePrefix setting does not start with -- and end with -.

This error occurs when prefix, tailwindPrefix, or themePrefix is not a valid prefix for custom properties. A prefix must start with --, end with -, and contain no whitespace. The message names the setting.

Reported

stillwind.config.ts
import { defineConfig } from "stillwind/config";

export default defineConfig({
  projects: [
    {
      css: "./src/stillwind.css",
      files: ["src/**/*.tsx"],
      prefix: "sw",
    },
  ],
});

SW01001: prefix must start with `--` and end with `-`

Fixed

stillwind.config.tsts
import { defineConfig } from "stillwind/config";

export default defineConfig({
  projects: [
    {
      css: "./src/stillwind.css",
      files: ["src/**/*.tsx"],
      prefix: "--sw-",
    },
  ],
});

How to fix

  • Add -- at the start and - at the end, as in the example.
  • Use the same value in client and server builds that share styles.