Skip to content

Instantly share code, notes, and snippets.

@prplmark
Last active May 23, 2016 18:51
Show Gist options
  • Save prplmark/060ad1613cdb73a416f673dcf8734a87 to your computer and use it in GitHub Desktop.
Save prplmark/060ad1613cdb73a416f673dcf8734a87 to your computer and use it in GitHub Desktop.
// # webpack.config.js
var webpack = require('webpack');
var path = require('path');
var BUILD_DIR = path.resolve(__dirname, './app/dist'); // Distribution directory
var APP_DIR = path.resolve(__dirname, './app'); // App directory
var config = {
entry: APP_DIR + '/app.js',
output: {
path: BUILD_DIR,
filename: 'build.js'
},
resolve: {
extensions: ['', '.js', '.jsx', 'index.js', '.json', 'index.json']
},
module : {
loaders : [
{
test : /\.js?/,
include : APP_DIR,
exclude : /node_modules/,
loader : 'babel'
}
]
}
}
module.exports = config;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment