@stylify/astro

Astro integration simplifies Stylify CSS integration into the Astro.build.

Try it on StackBlitz

Installation

Integration can be installed only via CLI like NPM or Yarn:

yarn add @stylify/astro
npm i @stylify/astro

Usage

Add a buildModule into the astro.config.mjs:

import { defineConfig } from 'astro/config';
import stylify from '@stylify/astro';

export default defineConfig({
	integrations: [stylify()]
});

Configuration

Configuration is optional. If the “bundles” option is not set, all files within the src directory will be compiled and a single stylify.css file will be generated and injected to all pages.

Configuration in astro.config.mjs:

stylify({
	// https://stylifycss.com/en/docs/unplugin#configuration
})

You can also configure Stylify CSS using custom file or stylify.config.js created next to the astro.config.mjs.

import { defineConfig } from '@stylify/astro';

export default defineConfig({
	// https://stylifycss.com/en/docs/unplugin#configuration
});

Configuration Snippets

You can also use configuration snippets for the Astro application to speed up the setup.

Where to go next?