Created
August 28, 2016 01:55
-
-
Save nmerouze/9efa74758d6bd19d057e80180437f2ec to your computer and use it in GitHub Desktop.
SASS with Webpack
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
{ | |
"scripts": { | |
"start": "./node_modules/.bin/webpack-dev-server --content-base static" | |
}, | |
"dependencies": { | |
"autoprefixer-loader": "^3.2.0", | |
"css-loader": "^0.24.0", | |
"extract-text-webpack-plugin": "^1.0.1", | |
"modularscale-sass": "^2.1.1", | |
"node-sass": "^3.8.0", | |
"normalize.css": "^4.2.0", | |
"sass-loader": "^4.0.0", | |
"style-loader": "^0.13.1", | |
"typi": "^2.3.0", | |
"webpack": "^1.13.1", | |
"webpack-dev-server": "^1.14.1" | |
} | |
} |
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
const path = require('path'); | |
const webpack = require('webpack'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
module.exports = { | |
entry: [ | |
'./scss/main.scss', | |
], | |
output: { | |
path: path.resolve(__dirname, './static'), | |
publicPath: '/', | |
}, | |
module: { | |
loaders: [{ | |
test: /\.scss$/, | |
loader: ExtractTextPlugin.extract('style', 'css!autoprefixer!sass'), | |
include: path.resolve(__dirname, './scss'), | |
}], | |
}, | |
plugins: [ | |
new ExtractTextPlugin('css/[name].css'), | |
], | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment