Skip to content

Instantly share code, notes, and snippets.

@chadrien
Last active April 5, 2016 12:16
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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