Socket
Socket
Sign inDemoInstall

@caiguanhao/vite-plugin-css-injected-by-js

Package Overview
Dependencies
181
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @caiguanhao/vite-plugin-css-injected-by-js

A Vite plugin that takes the CSS and adds it to the page through the JS. For those who want a single JS file.


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Vite Plugin: CssInjectedByJs

A Vite plugin that takes the CSS and adds it to the page through the JS. For those who want a single JS file.

How does it work

Essentially what it does is take all the CSS generated by the build process and add it through javascript. The CSS file is therefore not generated and the declaration in the generated HTML file is also removed.

Installation

yarn add -D @caiguanhao/vite-plugin-css-injected-by-js

Usage

import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js'

export default {
  plugins: [
    cssInJsPlugin(),
  ]
}

Keywords

FAQs

Last updated on 20 Nov 2021

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