Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@HoverBaum
Created July 19, 2016 07:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HoverBaum/2dec64c7395529e9bb93af92d7c7e544 to your computer and use it in GitHub Desktop.
Save HoverBaum/2dec64c7395529e9bb93af92d7c7e544 to your computer and use it in GitHub Desktop.
Basic webpack file for ReactJS based proejcts.
const path = require('path')
const webpack = require('webpack')
module.exports = {
entry: {
main: "./src/js/index.js"
},
output: {
path: path.join(__dirname, 'build', 'js'),
filename: "[name].js"
},
resolve: {
extensions: ['', '.js', '.jsx']
},
devtool: 'source-map',
module: {
loaders: [
{
test: /.jsx?$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['es2015', 'react']
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment