Created
July 19, 2016 07:43
-
-
Save HoverBaum/2dec64c7395529e9bb93af92d7c7e544 to your computer and use it in GitHub Desktop.
Basic webpack file for ReactJS based proejcts.
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
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