2015-02-04 01:33:40 +02:00
|
|
|
var path = require('path');
|
2015-02-08 03:01:15 +02:00
|
|
|
var webpack = require('webpack');
|
|
|
|
|
|
|
|
var uglifyJsPlugin = new webpack.optimize.UglifyJsPlugin();
|
2015-02-04 01:33:40 +02:00
|
|
|
|
2015-07-22 04:42:38 +02:00
|
|
|
var uiFolder = 'UI';
|
2015-08-09 21:02:18 +02:00
|
|
|
var root = path.join(__dirname, 'src', uiFolder);
|
2015-07-22 04:42:38 +02:00
|
|
|
|
2015-02-03 03:18:45 +02:00
|
|
|
module.exports = {
|
2015-08-27 08:32:38 +02:00
|
|
|
devtool : '#source-map',
|
|
|
|
watchOptions : { poll: true },
|
2015-02-08 03:01:15 +02:00
|
|
|
entry: {
|
|
|
|
vendor: 'vendor.js',
|
|
|
|
main: 'main.js'
|
|
|
|
},
|
2015-07-22 04:42:38 +02:00
|
|
|
resolve: {
|
2015-08-09 21:02:18 +02:00
|
|
|
root: root,
|
2015-07-22 04:42:38 +02:00
|
|
|
alias: {
|
2017-05-11 20:37:07 +02:00
|
|
|
'jdu': 'JsLibraries/jdu',
|
2015-07-22 04:42:38 +02:00
|
|
|
'libs': 'JsLibraries/'
|
2015-02-03 03:18:45 +02:00
|
|
|
}
|
2015-02-04 02:56:18 +02:00
|
|
|
},
|
2015-07-22 04:42:38 +02:00
|
|
|
output: {
|
|
|
|
filename: '_output/' + uiFolder + '/[name].js',
|
|
|
|
sourceMapFilename: '_output/' + uiFolder + '/[name].map'
|
2015-02-04 02:56:18 +02:00
|
|
|
},
|
2015-07-22 04:42:38 +02:00
|
|
|
plugins: [
|
|
|
|
new webpack.optimize.CommonsChunkPlugin({ name: 'vendor' })
|
|
|
|
],
|
2015-02-04 02:56:18 +02:00
|
|
|
module: {
|
2015-07-22 04:42:38 +02:00
|
|
|
|
2015-08-27 08:32:38 +02:00
|
|
|
//this doesn't work yet. waiting for https://github.com/spenceralger/rcloader/issues/5
|
2015-07-22 04:42:38 +02:00
|
|
|
/*preLoaders: [
|
|
|
|
{
|
|
|
|
test: /\.js$/, // include .js files
|
|
|
|
loader: "jshint-loader",
|
|
|
|
exclude: [/JsLibraries/,/node_modules/]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
*/
|
|
|
|
}
|
2015-02-03 03:18:45 +02:00
|
|
|
};
|