Socket
Socket
Sign inDemoInstall

vite-plugin-implicit-css-modules

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vite-plugin-implicit-css-modules

Implicitly replace class names using Vue css modules


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Created
Weekly downloads
 

Changelog

Source

0.0.2 (2022-10-12)

Features

  • 第一次提交 (e318ec9)

Readme

Source

vite-plugin-implicit-css-modules

Implicitly replace class names using Vue css modules

Installation

npm install -D vite-plugin-implicit-css-modules # npm
yarn add -D vite-plugin-implicit-css-modules # yarn
// vite.config.ts
import vitePluginImplicitCssModules from 'vite-plugin-implicit-css-modules';

export default defineConfig({
  plugins: [
    {
      ...vitePluginImplicitCssModules(),
      // Adjust the order of this plugin. https://vitejs.dev/guide/api-plugin.html#plugin-ordering
      enforce: 'pre',
    },
    vue()
  ],
  css: {
    modules: {
      // https://github.com/madyankin/postcss-modules#generating-scoped-names
      generateScopedName: '[local]___[hash:base64:5]',
      // https://github.com/madyankin/postcss-modules#localsconvention
      localsConvention: 'camelCase',
    },
  },
})

Example

example

Keywords

FAQs

Last updated on 12 Oct 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc