Last active
October 30, 2016 16:18
-
-
Save ArjunHariharan/4f2a91a5165d017251c6ff98e5a413b4 to your computer and use it in GitHub Desktop.
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
var webpack = require('webpack'); | |
var path = require('path'); | |
// Build Directory | |
// Webpack will put the bundled assets in this directory. | |
var BUILD_DIR = path.resolve(__dirname, 'build'); | |
// App directory | |
// Our source code lies here. | |
var APP_DIR = path.resolve(__dirname, 'src'); | |
// Webpack configuration | |
var config = { | |
// Entry point for webpack. | |
entry: APP_DIR + '/index.jsx', | |
// Name and path of the of the output file. | |
// bundle.js is the output file which will be placed in the build directory. | |
output: { | |
path: BUILD_DIR, | |
filename: 'bundle.js', | |
}, | |
// Use babel for compile jsx code. | |
module : { | |
loaders : [ | |
{ | |
test : /\.jsx?/, | |
include : APP_DIR, | |
loader : 'babel' | |
} | |
] | |
} | |
}; | |
module.exports = config; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment