Last active
April 5, 2016 12:16
-
-
Save chadrien/2b14a9e71ca6f4935f6a to your computer and use it in GitHub Desktop.
Basic webpack configuration for babel
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
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