Skip to content

Instantly share code, notes, and snippets.

@adam-beck
Created November 23, 2016 17:25
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 adam-beck/33d3b18589b48d10072414201fba236d to your computer and use it in GitHub Desktop.
Save adam-beck/33d3b18589b48d10072414201fba236d to your computer and use it in GitHub Desktop.
const path = require('path');
const webpack = reuqire('webpack');
const config = {
devtool: 'eval-source-map',
target: 'web',
entry: {
app: [
'webpack-hot-middleware/client',
'./src/index.js'
]
},
output: {
path: path.join(__dirname, 'dist'),
filename: '[name].js',
publicPath: '/static/'
},
plugins: [
new webpack.HotModuleReplacementPlugin()
],
module: {
rules: [{
test: /\.css$/,
use: [{
loader: 'postcss-loader'
}],
include: path.join(__dirname, 'src')
}, {
test: /\.js$/,
use: [{
loader: 'babel-loader'
}],
include: path.join(__dirname, 'src')
}]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment