Skip to content

Instantly share code, notes, and snippets.

@josemunozr
Created January 18, 2017 01:02
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save josemunozr/61291028a45cae5531cbbc2ea08c83fa to your computer and use it in GitHub Desktop.
Save josemunozr/61291028a45cae5531cbbc2ea08c83fa to your computer and use it in GitHub Desktop.
Example configuration webpack with loaders [babel{es2015, react}]
module.exports ={
resolve: {
extensions: ['', '.js','.jsx']
},
context: __dirname,
entry: {
app: ['./src/app.jsx']
},
output: {
path: './build',
filename: 'app.js',
publicPath: '/build/'
},
devServer:{
host: '0.0.0.0',
port: 8080,
inline: true
},
module: {
loaders: [
{
test: /(\.jsx?)$/,
loader: 'babel-loader',
query: {
presets: ['es2015','react']
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment