1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-14 11:23:42 +02:00
Sonarr/webpack.config.js
2018-12-29 13:08:46 +01:00

43 lines
963 B
JavaScript

var path = require('path');
var webpack = require('webpack');
var uglifyJsPlugin = new webpack.optimize.UglifyJsPlugin();
var uiFolder = 'UI';
var root = path.join(__dirname, 'src', uiFolder);
module.exports = {
devtool : '#source-map',
watchOptions : { poll: true },
entry: {
vendor: 'vendor.js',
main: 'main.js'
},
resolve: {
root: root,
alias: {
'jdu': 'JsLibraries/jdu',
'libs': 'JsLibraries/'
}
},
output: {
filename: '_output/' + uiFolder + '/[name].js',
sourceMapFilename: '_output/' + uiFolder + '/[name].map'
},
plugins: [
new webpack.optimize.CommonsChunkPlugin({ name: 'vendor' })
],
module: {
//this doesn't work yet. waiting for https://github.com/spenceralger/rcloader/issues/5
/*preLoaders: [
{
test: /\.js$/, // include .js files
loader: "jshint-loader",
exclude: [/JsLibraries/,/node_modules/]
}
]
*/
}
};