vite-plugin-sass

0.1.0 • Public • Published

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.

Readme

Keywords

none

Package Sidebar

Install

npm i vite-plugin-sass

Weekly Downloads

2,593

Version

0.1.0

License

ISC

Unpacked Size

3.06 kB

Total Files

4

Last publish

Collaborators

  • codewithnnamdi