2014-10-30 16:56:34 +01:00
|
|
|
// docs: http://webpack.github.io/docs/configuration.html
|
|
|
|
|
2014-11-06 21:26:55 +01:00
|
|
|
var path = require('path');
|
|
|
|
var root = path.normalize(path.join(__dirname, '.'));
|
|
|
|
var js_root = path.join(path.join(root, 'public'), 'js');
|
|
|
|
|
2014-10-30 16:56:34 +01:00
|
|
|
module.exports = {
|
|
|
|
|
2014-11-06 21:26:55 +01:00
|
|
|
context: js_root,
|
|
|
|
entry: 'app',
|
2014-10-30 16:56:34 +01:00
|
|
|
|
|
|
|
output: {
|
2014-11-06 21:26:55 +01:00
|
|
|
path: js_root,
|
2014-10-30 16:56:34 +01:00
|
|
|
filename: 'bundle.js',
|
|
|
|
publicPath: '/js/'
|
|
|
|
},
|
|
|
|
|
|
|
|
resolve: {
|
2014-11-06 22:45:17 +01:00
|
|
|
root: [js_root],
|
2014-11-06 21:26:55 +01:00
|
|
|
extensions: ['', '.js', '.jsx'],
|
2014-11-06 22:45:17 +01:00
|
|
|
modulesDirectories: ["web_modules", "node_modules"]
|
2014-10-30 16:56:34 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
module: {
|
|
|
|
loaders: [
|
2014-11-02 22:39:52 +01:00
|
|
|
{ test: /\.jsx$/, loader: 'jsx?harmony' }
|
2014-10-30 16:56:34 +01:00
|
|
|
]
|
|
|
|
},
|
|
|
|
|
2014-11-02 20:42:12 +01:00
|
|
|
devtool: "source-map",
|
|
|
|
|
2014-10-30 16:56:34 +01:00
|
|
|
externals: {
|
|
|
|
// stuff not in node_modules can be resolved here.
|
|
|
|
}
|
|
|
|
|
2014-11-06 21:26:55 +01:00
|
|
|
};
|