Skip to content

coxmi/vite-plugin-less-overrides

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vite-plugin-less-overrides

This plugin appends mixins and variable definitions to all imported css files, in order to overwrite any third party variables. Takes a relative string, glob, or array in the form less(paths: string|string[])

How it works

For each file found by the glob, an import definition is added to the bottom of each .less file using the reference import option:

@import (reference) "path/to/variables.less"

This only includes @at rules, variables and mixins.

Using vite:

import less from 'vite-plugin-less-overrides'

defineConfig({
    plugins: [
        less('./src/**/variables.less'),
    ]
})

About

Vite plugin to append mixins and variable definitions to all imported less files

Resources

Stars

Watchers

Forks

Packages

No packages published