🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

vite-plugin-less-overrides

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-less-overrides

Overwrite variables across all imports

0.0.2
latest
Source
npm
Version published
Maintainers
1
Created
Source

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'),
    ]
})

Keywords

vite

FAQs

Package last updated on 07 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts