-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
55 lines (53 loc) · 1.63 KB
/
webpack.config.js
File metadata and controls
55 lines (53 loc) · 1.63 KB
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
54
55
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var serverConfiguration = require('config').get('Server');
var config = {
entry: {
app: './app/app.js'
},
output: {
path: __dirname + '/',
filename: 'bundle.js'
},
resolve: {
root: __dirname + '/app/',
extensions: ['', '.webpack.js', '.web.js', '.ts', '.tsx', '.js']
},
plugins: [
new webpack.DefinePlugin({
'API_URL': serverConfiguration.url
}),
new HtmlWebpackPlugin({
template: './app/index.html',
inject: 'body',
hash: true
}),
new webpack.optimize.UglifyJsPlugin({
compress: {warnings: false}
})
],
ts: {
silent: true,
'ignoreDiagnostics': [
2403, // 2403 -> Subsequent variable declarations
2409,
2322,
2300, // 2300 -> Duplicate identifier
2374, // 2374 -> Duplicate number index signature
2375 // 2375 -> Duplicate string index signature
]
},
module: {
noParse: [],
loaders: [
{test: /\.html$/, loader: 'raw'},
{test: /\.htm$/, loader: 'raw'},
{test: /\.css$/, loaders: ['style', 'css']},
{test: /\.less$/, loader: 'style!css!less'},
{test: /\.jpg$/, loader: 'file-loader'},
{test: /\.tsx?$/, loader: 'ts-loader'},
{test: /\.(png|woff|woff2|eot|ttf|svg|gif)$/, loader: 'url-loader?limit=100000'}
]
}
};
module.exports = config;