vite-plugin-rtl-css
v1.0.9
Published
Vite plugin for rtlcss
Downloads
3,966
Readme
Vite Plugin Rtl Css
Vite plugin for rtlcss
Installation
$ npm install vite-plugin-rtl-css --save-devUsage
import { defineConfig } from 'vite';
import viteRtlCssPlugin from 'vite-plugin-rtl-css';
export default defineConfig({
plugins: [viteRtlCssPlugin()]
});This will transform css files to their rtl counterparts. Look below for options
Options
viteRtlCssPlugin({
fileNameMap: {
'.css': '[name].rtl.css',
'.min.css': '[name].rtl.min.css'
},
sourceMap: true,
rtlcssConfig: {
autoRename: true
}
});fileNameMapis an optional parameter that specifies a map of file extensions to templates for rtl css generation. What's seen in the example is the default.sourceMapis an optional parameter that specifies if sourcemaps should be generated. If this isn't specified it'll default tobuild.sourcemapfrom yourvite.config.ts.rtlcssConfigis an optional parameter that comes from thertlcsspackage that's used by this plugin to configurertlcss.
