Created
December 30, 2016 02:29
-
-
Save dkypooh/ff6d41253a36fdb40aef51a3e412b638 to your computer and use it in GitHub Desktop.
Postcss Webpack Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var webpackConfig = require('./webpack.config'); | |
| var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
| module.exports = { | |
| entry : './src/style.js', | |
| output : { | |
| filename : 'style.js', | |
| path : './docs' | |
| }, | |
| module : { | |
| loaders : [ | |
| { | |
| test : /\.css/, | |
| loader: ExtractTextPlugin.extract('style-loader', ['css-loader', 'postcss-loader', 'sass-loader']) | |
| } | |
| ] | |
| }, | |
| plugins: [ | |
| new ExtractTextPlugin("style.css") | |
| ], | |
| postcss: function (webpack) { | |
| return [ | |
| require('precss')(), | |
| require('postcss-bem')({ | |
| separators : { | |
| descendent : '_', | |
| modifier : '-' | |
| } | |
| }), | |
| require('postcss-calc')(), | |
| require("postcss-import")(), | |
| require("postcss-url")(), | |
| require("postcss-nested")(), | |
| require("postcss-cssnext")(), | |
| require('postcss-utilities')() | |
| // require('cssnano')() | |
| ] | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment