-
Notifications
You must be signed in to change notification settings - Fork 117
/
webpack.config.js
48 lines (46 loc) · 1.26 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
var path = require('path');
var webpack = require('webpack');
var VERSION = require('./package.json').version;
var banner =
'/*!\n' +
' * Semantic-UI AngularJS integration\n' +
' * https://github.com/semantic-org/semantic-ui-angular\n' +
' * @license MIT\n' +
' * v' + VERSION + '\n' +
' */\n';
module.exports = {
context: path.resolve('src'),
devtool: "source-map",
entry: {
'semantic-ui-angular': './index',
'semantic-ui-angular.min': './index'
},
output: {
path: path.resolve('dist'),
filename: '[name].js'
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/,
minimize: true
}),
new webpack.BannerPlugin(banner, {raw: true})
],
module: {
preLoaders: [
{ test: /\.ts$/, exclude: /node_modules/, loader: 'tslint-loader' },
// TODO(m0t0r): JSCS complains on TS code, decide if we actually can/need make it work
//{ test: /\.ts$/, exclude: /node_modules/, loader: 'jscs-loader' }
],
loaders: [
{ test: /\.ts?$/, exclude: /node_modules/, loader: 'ts-loader' },
{ test: /\.json?$/, exclude: /node_modules/, loader: 'json-loader' }
]
},
tslint: {
configuration: require('./tslint.json')
},
resolve: {
extensions: ['', '.ts', '.js']
}
};