Skip to content

Instantly share code, notes, and snippets.

@chadrien
Last active April 5, 2016 12:16
Show Gist options
  • Save chadrien/2b14a9e71ca6f4935f6a to your computer and use it in GitHub Desktop.
Save chadrien/2b14a9e71ca6f4935f6a to your computer and use it in GitHub Desktop.
Basic webpack configuration for babel
import path from 'path'
let srcDir = 'src'
let distDir = 'dist'
export default {
context: path.join(__dirname, srcDir),
entry: {
app: './index.js'
},
output: {
path: path.join(__dirname, distDir),
filename: '[name].js'
},
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel' }
]
},
devServer: {
contentBase: distDir,
stats: {
colors: true
},
historyApiFallback: true
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment