0.1.7 • Published 5 years ago
rollup-plugin-multi-scss v0.1.7
rollup-plugin-multi-scss 
The rollup plugin compile scss to css which required by your JavaScript, and copy the assets required by scss/css file to your target folder.
Installation
$ npm install --save-dev rollup-plugin-multi-scssOr
$ yarn add --dev rollup-plugin-multi-scssUsage
import scss from 'rollup-plugin-multi-scss';
export default {
input: ['./src/input/index.js', './src/input2/index.js'],
output: {
dir: './dist/',
format: 'esm',
sourcemap: true
},
// If preserveModules were false, the bundled css file share the same name with bundled js file
preserveModules: true,
plugins: [
scss(),
]
}Options (all optional)
includeSCSS/CSS file you want to include, like '//*.css', '//*.scss', if you pass this option, thedefaultlist will be over write. default to['/**/*.css', '/**/*.scss'].excludeFiles you want to exclude, like 'src/useless/useless.scss'.defaultto[]. -includePathsSCSS bundling include path, which is used to find required scss files.defaultto['node_modules']and current cwd.outputOutput path.defaultto same as js output;assetsPathAssets storage folder.defaultto'img'.prefixPrefix content which need add to each scss file.defaulttoempty.processorCustom processor function.defaulttoundefined.keepNameKeep assets name with hash.defaulttotrue