Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nitedani/vite-plugin-compiled-react
https://github.com/nitedani/vite-plugin-compiled-react
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/nitedani/vite-plugin-compiled-react
- Owner: nitedani
- Created: 2023-11-11T16:40:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-30T18:31:28.000Z (12 months ago)
- Last Synced: 2024-10-02T08:55:53.515Z (3 months ago)
- Language: TypeScript
- Size: 85.9 KB
- Stars: 11
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# vite-plugin-compiled-react
Vite plugin for https://github.com/atlassian-labs/compiled
PostCSS config is supported when extraction is enabled.
CSS extraction can be enabled for `build` and `serve` separately.
`extract: { build: true, serve: true }`
or a shorthand `extract: true`Your SSR framework may not support preloading extracted CSS in development mode.
Usage:
```
npm i @compiled/react
npm i -D vite-plugin-compiled-react
``````ts
import { compiled } from "vite-plugin-compiled-react";export default defineConfig({
plugins: [react(), compiled({ extract: true })],
});
``````tsx
const Component = () => (
Hello
);
```
Typescript should work out of the box.