css

CSS language support for jsrepo.

SourceOfficialDefault

The css language plugin supports dependency resolution for CSS, SCSS, and Sass files as well as installing remote dependencies with ecosystem: "js".

Supported syntax

The CSS plugin uses the css-dependency library under the hood to detect dependencies. So it supports all the following syntax:

  • @import statements
  • @plugin statements (if allowTailwindDirectives is true)
  • @config statements (if allowTailwindDirectives is true)
  • @reference statements (if allowTailwindDirectives is true)

By default allowTailwindDirectives is true so it will also detect Tailwind directives as imports. To opt out of this behavior you can set allowTailwindDirectives to false.

import { defineConfig } from "jsrepo";
import { css } from "jsrepo/langs";

export default defineConfig({
	languages: [css({ allowTailwindDirectives: false })], 
});

Supported File Extensions

The CSS language plugin supports the following file extensions:

Extension
.css
.scss
.sass