Skip to content

Instantly share code, notes, and snippets.

@nmerouze
Created August 28, 2016 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nmerouze/9efa74758d6bd19d057e80180437f2ec to your computer and use it in GitHub Desktop.
Save nmerouze/9efa74758d6bd19d057e80180437f2ec to your computer and use it in GitHub Desktop.
SASS with Webpack
{
"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"
}
}
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