Skip to content

Latest commit

 

History

History
50 lines (42 loc) · 1.34 KB

webpack.md

File metadata and controls

50 lines (42 loc) · 1.34 KB

Webpack

The blocks styles use css-variable and will work in all modern browsers. If you need to support more old browsers such as Interner Explorer 11 or lower, use a tool postcss with postcss-preset-env for transforming css into something most browsers can understand.

Read more about webpack-configuration

Rule

{
    test: /\.css$/,
    use: [
        'style-loader', // replace with your loader
        {
            loader: 'css-loader',
            options: {
                importLoaders: 1
            }
        },
        {
            loader: 'postcss-loader',
            options: {
                plugins: [
                    require('postcss-import')(),
                    require('postcss-preset-env')()
                ]
            }
        }
    ]
}

Postcss dependencies

npm install postcss postcss-import postcss-loader postcss-preset-env --save-dev