1.0.3 • Published 3 years ago
@smoosee/vite-plugin-sass v1.0.3
Install
- Install the plugin:
yarn add @smoosee/vite-plugin-sass -D- Add the plugin
import { defineConfig } from 'vite';
import VitePluginSass from '@smoosee/vite-plugin-sass';
export default defineConfig({
plugins: [VitePluginSass()],
});How it works
This plugin is meant mainly to fix a long standing issue with vite
7651/11012.The plugin is enforced
pre, and it compiles the original sass code into css (not redundant to the vite compiling process).Using
source-mapslibrary inside apostcssplugin to resolve the original paths of whereurl()methods are called in the.scssfiles, and updating the source files with the relative address of those assets to the root.scssfile.
