Gathering detailed insights and metrics for vite-plugin-vue2-css-vars
Gathering detailed insights and metrics for vite-plugin-vue2-css-vars
Gathering detailed insights and metrics for vite-plugin-vue2-css-vars
Gathering detailed insights and metrics for vite-plugin-vue2-css-vars
A vite plugin that can allows you to use the CSS variable injection feature in Vue 2.x version.
npm install vite-plugin-vue2-css-vars
Typescript
Module System
Node Version
NPM Version
TypeScript (79.26%)
Vue (9.7%)
JavaScript (6.74%)
HTML (2.55%)
CSS (1.75%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
7 Stars
39 Commits
2 Forks
1 Watchers
1 Branches
1 Contributors
Updated on Apr 07, 2023
Latest Version
0.2.3
Package Id
vite-plugin-vue2-css-vars@0.2.3
Unpacked Size
19.77 kB
Size
4.98 kB
File Count
6
NPM Version
6.14.13
Node Version
14.17.3
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
A vite plugin that can allows you to use the CSS variable injection feature in Vue 2.x version.
Install:
1npm i vite-plugin-vue2-css-vars -D
Add the plugin to the vite.config.ts
(or vite.config.js
),note it must be add before vite-plugin-vue2
plugin:
1import { defineConfig } from "vite"; 2import { createVuePlugin } from "vite-plugin-vue2"; 3import vitePluginVue2CssVars from "vite-plugin-vue2-css-vars"; 4 5export default defineConfig({ 6 plugins: [vitePluginVue2CssVars(), createVuePlugin()], 7});
And then, you can use the params of data
options in SFC's <style>
by v-bind
directive:
1<template> 2 <div> 3 <button @click="changeColor">change color</button> 4 <div class="word">vue2</div> 5 </div> 6</template> 7 8<script> 9 export default { 10 data() { 11 return { 12 color: "blue", 13 }; 14 }, 15 methods: { 16 changeColor() { 17 if (this.color === "red") { 18 this.color = "black"; 19 } else { 20 this.color = "red"; 21 } 22 }, 23 }, 24 }; 25</script> 26 27<style scoped vars> 28 .word { 29 background: v-bind(color); 30 } 31</style>
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
no SAST tool detected
Details
Reason
project is not fuzzed
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
50 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
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