0.8.0 • Published 1 year ago

vite-plugin-stylex-dev v0.8.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vite-plugin-stylex

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

Features

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

Usage

$ yarn add vite-plugin-stylex-dev -D
// vite.config.ts
import { defineConfig } from 'vite'
import { stylex } from 'vite-plugin-stylex-dev'

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

// then find your project entry(If you don't using manuallyControlCssOrder option)
import 'virtual:stylex.css'

Options

paramstypedefaultdescription
includestring \| RegExp \| Array<string \| RegExp>/\.(mjs\|js\|ts\|vue\|jsx\|tsx)(\?.*\|)$/Include all assets matching any of these conditions.
excludestring \| RegExp \| Array<string \| RegExp>-Exclude all assets matching any of these conditions.
importSourcesstring[]['stylex', '@stylexjs/stylex']See stylex document.
babelConfigobject{}Babel config for stylex
unstable_moduleResolutionRecord<string,any>{ type: 'commonJS', rootDir: process.cwd() }See stylex document
useCSSLayersbooleanfalseSee stylex document
optimizedDepsArray<string>[]Work with external stylex files or libraries
manuallyControlCssOrderboolean \|objectfalsecontrol css order by manually
enableStylexExtendboolean \| StylexExtendOptionsfalsesee @stylex-extend/babel-plugin docss

Q & A

Q&A

Author

Kanno

LICENSE

MIT

0.8.0

1 year ago

0.7.5

1 year ago

0.7.4

1 year ago

0.7.3

1 year ago

0.7.2

1 year ago

0.7.1

1 year ago

0.6.3

1 year ago

0.6.2

1 year ago

0.6.4

1 year ago

0.7.0

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.5.2

1 year ago

0.5.0

1 year ago

0.5.1

1 year ago

0.4.1

1 year ago

0.4.0

1 year ago

0.3.0

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.2.3

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.2.2

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago