Created
November 23, 2016 17:25
-
-
Save adam-beck/33d3b18589b48d10072414201fba236d to your computer and use it in GitHub Desktop.
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 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