npm i @stylable/rollup-plugin -D
or
yarn add @stylable/rollup-plugin --dev
// rollup.config.js
import stylable from "@stylable/rollup-plugin";
export default {
...
plugins: [ stylable() ]
}
interface StylableRollupPluginOptions {
minify?: boolean;
inlineAssets?: boolean;
fileName?: string;
diagnosticsMode?: 'auto' | 'strict' | 'loose';
/**
* A function to override Stylable instance default configuration options
*/
stylableConfig?: (config: StylableConfig) => StylableConfig;
/**
* Runs "stc" programmatically with the webpack compilation.
* true - it will automatically detect the closest "stylable.config.js" file and use it.
* string - it will use the provided string as the "stcConfig" file path.
*/
stcConfig?: string | boolean;
}
This package provides naive Stylable rollup plugin. It is in early development stages and may not behave expectedly in all cases. Please open a PR/issue if you encounter any problems.
Copyright (c) 2021 Wix.com Ltd. All Rights Reserved. Use of this source code is governed by an MIT license.