Last active
August 3, 2016 00:16
-
-
Save tyom/6dfc2d4becac2cac3efe77a1c1d88762 to your computer and use it in GitHub Desktop.
Simple Webpack Dev Server + Sass config
This file contains 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
{ | |
"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" | |
} | |
} |
This file contains 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 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