4.4.7-alpha.9 • Published 3 years ago

@mrbuilder/plugin-css v4.4.7-alpha.9

Weekly downloads
33
License
MIT
Repository
-
Last release
3 years ago

This plugin provides css and css module support for mrbuider. It also supports webpack-extract-text-plugin and autoprefixer.

This plugin also exports a helper functions for other css like importers such as less-loader and stylus loader. Require mrbuilder-plugin-css/src/cssLoader, in new css loaders to allow for the same pipeline. This allows css output to be controlled by the css loader, while configuration of the loader is handled by the webpack loader.

const cssLoader = require('mrbuilder-plugin-css/src/cssLoader');
module.exports = function(options, webpack){

    cssLoader(webpack, /*.sass$/, false, {
        loader:'sass-loader',
        options,
    });
    if (options.modules){
        cssLoader(webpack, /*.sassm$/, true, {
            loader:'sass-loader',
            options,
        });
    }

}

less -> autprefixer -> css-loader -> (extract-text or style-loader)

PropertyTypeDefaultDescription
testregex/.css$/Css loads
useStyleLoaderbooltrueUse extract text plugin
publicPathstring/publicThe public Path
modulesbool or regex/.cssm/Support CSS Modules
autoprefixerbooltrueInclude autoprefixer support
sourceMapbooltrueinclude sourcemap support
localIdentNamestringhashpackage-namehyphen:base-name_localthe localIdentName for css modules