-
Notifications
You must be signed in to change notification settings - Fork 1
Open
0 / 20 of 2 issues completedDescription
Atm Salty CSS already works with Astro as CSS-in-JS solution when first adding a React.js integration.
Steps to make Salty CSS in Astro happen before integration is live:
- Add React integration to Astro https://docs.astro.build/en/guides/integrations-guide/react/
- Initialize Salty CSS with CLI
npx salty-css init - Install and add React and Vite packages manually
npm i @salty-css/react @salty-css/vite - Add following vite configuration snippet to your
astro.config:
// Import
import saltyPlugin from "@salty-css/vite";
// Config
export default defineConfig({
vite: {
plugins: [
saltyPlugin("dirname_or_path_to_your_repo"),
],
},
});
- Create new Salty CSS components with
npx salty-css generate [dir]
Additionally className function works out of the box great atm with astro components.