@superstyling/vite
v0.2.0
Published
Vite integration for Superstyling — plugin wrapper, SSG helpers
Downloads
34
Readme
@superstyling/vite
Vite integration for Superstyling. Wraps @tamagui/vite-plugin, composes the needed aliases and optimizeDeps hints, and ships a color-mode script snippet for FOUC-free first paint.
Install
yarn add @superstyling/core @superstyling/vite
yarn add -D react-native-webUsage
vite.config.ts:
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { superstylingVitePlugin } from "@superstyling/vite";
export default defineConfig({
plugins: [
react(),
superstylingVitePlugin({
config: "./tamagui.config.ts",
components: ["@superstyling/core"],
}),
],
});index.html — prevent color-mode FOUC:
<script>
/* paste output of colorModeScriptSnippet() here at build time */
</script>Docs
See the Vite getting-started guide.
License
MIT
