laravel-mix-yq
Version:
Laravel Mix is an elegant wrapper around Webpack for the 80% use case.
38 lines (31 loc) • 861 B
JavaScript
let Preprocessor = require('./Preprocessor');
let Assert = require('../Assert');
class FastSass extends Preprocessor {
/**
* The API name for the component.
*/
name() {
return ['fastSass', 'standaloneSass'];
}
/**
* Register the component.
*
* @param {*} src
* @param {string} output
* @param {Object} pluginOptions
*/
register(src, output, pluginOptions = {}) {
Assert.exists(src);
return this.preprocess('fastSass', src, output, pluginOptions);
}
/**
* webpack plugins to be appended to the master config.
*/
webpackPlugins() {
let FastSassPlugin = require('../webpackPlugins/FastSassPlugin');
return (super.webpackPlugins() || []).concat(
new FastSassPlugin(this.details)
);
}
}
module.exports = FastSass;