Experimental vite plugin
npm install --dev @stylex-extend/vite
import { defineConfig } from 'vite'
import { stylex } from '@stylex-extend/vite'
export default defineConfig({
plugins: [
// ... your plugins
stylex()
]
})
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 |
useCSSLayers |
boolean |
false |
See stylex document |
optimizedDeps |
Array<string> |
[] |
Work with external stylex files or libraries |
macroTransport |
false |object |
'props' |
Using stylex extend macro |
Kanno