Gathering detailed insights and metrics for vite-plugin-theme
Gathering detailed insights and metrics for vite-plugin-theme
Gathering detailed insights and metrics for vite-plugin-theme
Gathering detailed insights and metrics for vite-plugin-theme
@rys-fe/vite-plugin-theme
Vite plugin for dynamically changing the theme color of the interface
@zougt/vite-plugin-theme-preprocessor
css theme preprocessor plugin for vite
@pureadmin/theme
pure admin theme plugin for vite
vite-plugin-theme-vite3
Vite plugin for dynamically changing the theme color of the interface
Vite plugin for dynamically changing the theme color of the interface
npm install vite-plugin-theme
Typescript
Module System
Node Version
NPM Version
TypeScript (95.36%)
JavaScript (4.64%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
140 Stars
45 Commits
34 Forks
3 Watchers
1 Branches
3 Contributors
Updated on May 08, 2025
Latest Version
0.8.6
Package Id
vite-plugin-theme@0.8.6
Unpacked Size
2.50 MB
Size
660.55 kB
File Count
14
NPM Version
8.5.2
Node Version
17.7.1
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
1
30
English | 中文
Vite plugin for dynamically changing the theme color of the interface
After vite processes the css and dynamically analyzes the color value in the css text that matches the plug-in configuration, extract the specified color style code from all output css files. And create a app-theme-style.css
file containing only color styles, dynamically insert it into the specified position (the bottom of the default body), and then replace the custom style/component library style color used with the new color, In order to achieve the purpose of dynamically changing the theme color of the project
node version: >=12.0.0
vite version: >=2.0.0
yarn add vite-plugin-theme -D
or
npm i vite-plugin-theme -D
1import { defineConfig, Plugin } from 'vite'; 2import vue from '@vitejs/plugin-vue'; 3 4import { viteThemePlugin, mixLighten, mixDarken, tinycolor } from 'vite-plugin-theme'; 5 6export default defineConfig({ 7 plugins: [ 8 vue(), 9 viteThemePlugin({ 10 // Match the color to be modified 11 colorVariables: [], 12 }); 13 ], 14});
viteThemePlugin(Options)
Options
param | type | default | desc |
---|---|---|---|
colorVariables | string[] | - | If css contains the color value in the array, css will be extracted |
wrapperCssSelector | string | - | Universal outer selector. You can pass in'body' and other selectors to increase the level |
resolveSelector | (selector:string)=>string | - | Custom selector conversion |
customerExtractVariable | (css:string)=>string | - | Custom css matching color extraction logic |
fileName | string | app-theme-style.hash.css | File name output after packaging |
injectTo | body or head or body-prepend | body | The css loaded in the production environment is injected into the label body |
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
project is archived
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
Found 2/27 approved changesets -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
68 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More