Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vite-plugin-css-injected-by-js

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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.

  • 2.2.0-beta-0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
127K
decreased by-22.43%
Maintainers
1
Weekly downloads
 
Created

What is vite-plugin-css-injected-by-js?

vite-plugin-css-injected-by-js is a Vite plugin that allows you to inject CSS directly into the JavaScript bundle. This can be useful for scenarios where you want to avoid separate CSS files and ensure that styles are loaded synchronously with your JavaScript.

What are vite-plugin-css-injected-by-js's main functionalities?

Inject CSS into JavaScript

This feature allows you to configure Vite to inject CSS directly into the JavaScript bundle. By using the `cssInjectedByJsPlugin` in the Vite configuration, the CSS will be included in the JavaScript output, ensuring that styles are applied as soon as the JavaScript is executed.

import { defineConfig } from 'vite';
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';

export default defineConfig({
  plugins: [cssInjectedByJsPlugin()]
});

Other packages similar to vite-plugin-css-injected-by-js

Keywords

FAQs

Package last updated on 15 Dec 2022

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc