Skip to content

Instantly share code, notes, and snippets.

@tyom
Last active August 3, 2016 00:16
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 tyom/6dfc2d4becac2cac3efe77a1c1d88762 to your computer and use it in GitHub Desktop.
Save tyom/6dfc2d4becac2cac3efe77a1c1d88762 to your computer and use it in GitHub Desktop.
Simple Webpack Dev Server + Sass config
{
"devDependencies": {
"babel-core": "^6.11.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"babel-register": "^6.11.6",
"css-loader": "^0.23.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"node-sass": "^3.8.0",
"resolve-url": "^0.2.1",
"resolve-url-loader": "^1.6.0",
"sass-loader": "^4.0.0",
"style-loader": "^0.13.1",
"webpack": "^1.13.1"
}
}
const webpack = require('webpack');
module.exports = {
entry: ['./app.js'],
output: {
path: 'dist',
filename: 'bundle.js',
publicPath: '/'
},
module: {
loaders: [{
test: /\.js/,
exclude: /node_modules/,
loader: 'babel'
}, {
test: /\.scss/,
exclude: /node_modules/,
loader: 'style!css?sourceMap!resolve-url!sass?sourceMap'
}, {
test: /\.(woff2?|ttf|eot|svg)$/,
loader: 'file'
}]
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
devtool: 'source-map',
devServer: {
hot: true,
inline: true,
stats: {
colors: true,
chunks: false
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment