mcss-loader-webpack

1.1.0 • Public • Published

mcss-loader

Loads a MCSS file and compiles it to CSS.

Use the css-loader and style-loader to turn it into a JS module and the mini-css-extract-plugin to extract it into a separate file.

Install

npm install mcss-loader --save-dev

Examples

hain the mcss-loader with the css-loader and the style-loader to immediately apply all styles to the DOM.

ser more options in mcss

// webpack.config.js
const path = require('path')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
 
module.exports = {
    devtool: 'cheap-source-map',
    module: {
        rules: [{
            test: /\.mcss$/,
            use: [{
                loader: MiniCssExtractPlugin.loader //or 'style-loader' in development
            }, {
                loader: "css-loader"
            }, {
                loader: 'mcss-loader',
                options: {
                    format: 3,
                    sourcemap: true
                }
            }]
        }]
    },
    plugins: [
        new MiniCssExtractPlugin({
            filename: '/css/[name].[hash:8].css',
            chunkFilename: '/css/[name].[hash:8].css'
        }),
    ]
};

developer

  • download mcss-loader from github
git clone  https://github.com/lit-forest/mcss-loader.git
  • run dev
npm run dev 

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i mcss-loader-webpack

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

4.18 kB

Total Files

7

Last publish

Collaborators

  • sylvenas