var webpack = require('webpack');
var path = require('path');

var BUILD_DIR = path.resolve(__dirname, 'build');
var APP_DIR = path.resolve(__dirname, 'src');

module.exports = {
	entry: APP_DIR + '/index.js',

	output: {
		path: BUILD_DIR,
		filename: 'bundle.js'
	},

	module: {
		loaders: [{
			test: /\.jsx?/,
			include: APP_DIR,
			loader: 'babel'
		},{
			test: /\.js?/,
			include: APP_DIR,
			loader: 'babel'
		},{
			test: /\.json$/,
			loader: 'json-loader'
		}]
	}
}
var webpack = require('webpack');
var path = require('path');

var BUILD_DIR = path.resolve(__dirname, 'build');
var APP_DIR = path.resolve(__dirname, 'src');

module.exports = {
	entry: APP_DIR + '/index.js',

	output: {
		path: BUILD_DIR,
		filename: 'bundle.js'
	},

	module: {
		loaders: [{
			test: /\.jsx?/,
			include: APP_DIR,
			loader: 'babel'
		},{
			test: /\.js?/,
			include: APP_DIR,
			loader: 'babel'
		},{
			test: /\.json$/,
			loader: 'json-loader'
		}]
	},

	plugins: [
		new webpack.DefinePlugin({
		  "process.env": {
		    NODE_ENV: JSON.stringify("production")
		  }
		})
	]
}
修复一个发布版本注意的问题 http://facebook.github.io/react/docs/getting-started.html#using-react-from-npm