🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-plugin-sass

A simple vite plugin to use StylishCSS within your own vite project

0.1.0
latest
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created

Vite-Plugin-Sass

DISCLAIMER: This plugin uses the sass package to compile Sass files to CSS, and it checks whether a file has the .scss extension before attempting to transform it. If the file is a Sass file, the plugin compiles the Sass code to CSS using sass.render() and returns the result.

To use this plugin in your Vite project, you can install it using npm or yarn:

npm install vite-plugin-sass --save-dev

Then, in your vite.config.js file, you can import the plugin and add it to the plugins array:

const vitePluginSass = require('vite-plugin-sass');

module.exports = {
  plugins: [vitePluginSass()],
};

With this plugin installed and configured, you can import Sass files in your JavaScript or TypeScript code just like you would any other module:

import './styles.scss';

And Vite will automatically transform the Sass code to CSS and include it in your project.

FAQs

Package last updated on 04 Mar 2023

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