vite-plugin-stylex-dev
TypeScript icon, indicating that this package has built-in type declarations

0.7.5 • Public • Published

vite-plugin-stylex

[!WARNING] This is an unofficial repo. This plugin is dedicated to providing stable stylex integration.

Features

  • [x] CSS automatic injection
  • [x] Support HMR
  • [x] Control css order by manually
  • [x] Support Vite-based SSR framework

Usage

$ yarn add vite-plugin-stylex-dev -D
import { defineConfig } from "vite";
import { stylexPlugin } from "vite-plugin-stylex-dev";

export default defineConfig({
  plugins: [stylex()],
});

Options

params type default description
include string | RegExp | Array<string | RegExp> /\.(mjs|js|ts|vue|jsx|tsx)(\?.*|)$/ Include all assets matching any of these conditions.
exclude string | RegExp | Array<string | RegExp> - Exclude all assets matching any of these conditions.
importSources string[] ['stylex', '@stylexjs/stylex'] See stylex document.
babelConfig object {} Babel config for stylex
unstable_moduleResolution Record<string,any> { type: 'commonJS', rootDir: process.cwd() } See stylex document
useCSSLayers boolean false See stylex document
optimizedDeps Array<string> [] Work with external stylex files or libraries
manuallyControlCssOrder boolean |object false control css order by manually
enableStylexExtend boolean | StylexExtendOptions false see @stylex-extend/babel-plugin docss

Q & A

Q&A

Author

Kanno

LICENSE

MIT

Package Sidebar

Install

npm i vite-plugin-stylex-dev

Weekly Downloads

1,054

Version

0.7.5

License

MIT

Unpacked Size

31.5 kB

Total Files

7

Last publish

Collaborators

  • nonzzz