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
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
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.