Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.