@stylexswc/unplugin v0.8.1
Unplugin with NAPI-RS StyleX compiler integration
Uplugin for an unofficial
napi-rs
compiler that includes the StyleX SWC code transformation under the hood.
Installation
To install the package, run the following command:
npm install --save-dev @stylexswc/unpluginUsage
To use the plugin, you need to add it to your build tool configuration.
For every plugin have an example of how to use it in
apps/{pluginName}-unplugin-example
folder.
Plugins
// vite.config.ts
import StylexRsPlugin from '@stylexswc/unplugin/vite';
export default defineConfig({
plugins: [
StylexRsPlugin({
/* options */
}),
],
});// rollup.config.js
import StylexRsPlugin from '@stylexswc/unplugin/rollup';
export default {
plugins: [
StylexRsPlugin({
/* options */
}),
],
};// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('@stylexswc/unplugin/webpack')({
/* options */
}),
],
};// nuxt.config.js
export default defineNuxtConfig({
modules: [
[
'@stylexswc/unplugin/nuxt',
{
/* options */
},
],
],
});This module works for both Nuxt 2 and Nuxt Vite
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('@stylexswc/unplugin/webpack')({
/* options */
}),
],
},
};// esbuild.config.js
import { build } from 'esbuild';
import StylexRsPlugin from '@stylexswc/unplugin/esbuild';
build({
plugins: [StylexRsPlugin()],
});11 months ago
11 months ago
10 months ago
10 months ago
11 months ago
11 months ago
9 months ago
11 months ago
9 months ago
10 months ago
12 months ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago