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, '.'));
|
2016-04-24 22:41:37 +02:00
|
|
|
var jsroot = path.join(path.join(root, 'public'), 'js');
|
2014-11-06 21:26:55 +01:00
|
|
|
|
2014-10-30 16:56:34 +01:00
|
|
|
module.exports = {
|
|
|
|
|
2016-04-24 22:41:37 +02:00
|
|
|
context: jsroot,
|
2015-03-27 10:55:42 +01:00
|
|
|
entry: 'app',
|
2014-10-30 16:56:34 +01:00
|
|
|
|
|
|
|
output: {
|
2016-04-24 22:41:37 +02:00
|
|
|
path: jsroot,
|
2014-10-30 16:56:34 +01:00
|
|
|
filename: 'bundle.js',
|
|
|
|
publicPath: '/js/'
|
|
|
|
},
|
|
|
|
|
|
|
|
resolve: {
|
2016-04-24 22:41:37 +02:00
|
|
|
root: [jsroot],
|
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
|
|
|
};
|