Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 693 Bytes

README.md

File metadata and controls

52 lines (38 loc) · 693 Bytes

webpack-require-css

webpack-require-css

Just load css file

Install

npm install webpack-require-css --save-dev

Useage

page.js

require("css/index.css");

webpack.config.js

webpack 2

module:{
        rules:[
            {
                test: /\.css$/,
                loader:"webpack-require-css",
                options:{
                    publicPath:'/static/css/'
                }
            }
        ]
    }

webpack 1.x.x

module:{
        loaders:[
            {
                test: /\.css$/,
                loader: 'webpack-require-css?publicPath=/css/'
            }
        ]
    }