-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathwebpack.config.release.js
46 lines (41 loc) · 1.03 KB
/
webpack.config.release.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
"use strict";
var Path = require('path');
var webpack = require("webpack");
var rootDir = __dirname;
var buildPath = Path.join(rootDir, 'build');
var buildName = 'rad.min.js';
function getPath(url) {
return Path.join(rootDir, 'src', url);
}
module.exports = {
entry: getPath('rad.js'),
devtool: 'source-map',
output: {
libraryTarget: "umd",
library: "RAD",
path: buildPath,
filename: buildName,
sourceMapFilename: '[file].map'
},
node: {
__filename: true
},
// Define global variable names that could be required from RAD modules
externals: {
'backbone': {
root: 'Backbone',
commonjs2: 'backbone',
commonjs: 'backbone',
amd: 'backbone'
},
'underscore': {
root: '_',
commonjs2: 'underscore',
commonjs: 'underscore',
amd: 'underscore'
}
},
plugins: [
new webpack.optimize.UglifyJsPlugin({ output: {comments: false} })
]
};