forked from angular-ui/ui-router
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
53 lines (45 loc) · 1.19 KB
/
webpack.config.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
47
48
49
50
51
52
53
var pkg = require('./package.json');
var banner = pkg.description + '\n' +
'@version v' + pkg.version + '\n' +
'@link ' + pkg.homepage + '\n' +
'@license MIT License, http://www.opensource.org/licenses/MIT';
var webpack = require('webpack');
module.exports = {
entry: {
"angular-ui-router": "./src/index.ts",
"angular-ui-router.min": "./src/index.ts",
"stateEvents": "./src/legacy/stateEvents.ts",
"stateEvents.min": "./src/legacy/stateEvents.ts",
},
output: {
path: __dirname + "/release",
filename: "[name].js",
libraryTarget: "umd",
library: "angular-ui-router",
umdNamedDefine: true
},
devtool: 'source-map',
resolve: {
modulesDirectories: ['node_modules'],
extensions: ['', '.js', '.ts']
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/, minimize: true
}),
new webpack.BannerPlugin(banner)
],
module: {
loaders: [
{ test: /\.tsx?$/, loader: "awesome-typescript-loader?noEmit=true" }
]
},
ts: {
compilerOptions: {
declaration: false
}
},
externals: {
"angular": { root: 'angular', amd: 'angular', commonjs2: 'angular', commonjs: 'angular' }
}
};