Skip to content

SW01002: Invalid hash length

The hashLength setting is outside the supported range.

This error occurs when hashLength is not an integer from 1 to 50. The setting chooses the number of hash characters in generated names. The message shows the value and the maximum.

Reported

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

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

SW01002: hashLength must be between 1 and 50 base-36 digits, not 0

Fixed

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

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

How to fix

  • Use an integer from 1 to 50. The default is 5.
  • To shorten names, lower the value. To make collisions less likely, raise it.
  • Use the same value in client and server builds that share styles.