Skip to content

Commit 778aa4d

Browse files
authored
Merge pull request #94 from sygic-travel/build-cleanup
Build cleanup
2 parents 8acd30a + abd153d commit 778aa4d

File tree

4 files changed

+643
-83
lines changed

4 files changed

+643
-83
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": "MIT",
77
"scripts": {
88
"dev": "webpack-dev-server",
9-
"build": "webpack -p --config ./webpack.prod.config.js",
9+
"build": "webpack --config ./webpack.prod.config.js",
1010
"test": "mocha-webpack --webpack-config webpack.config.js \"src/**/*.test.ts\" --reporter \"list\"",
1111
"test-watch": "mocha-webpack --watch --webpack-config webpack.config.js \"src/**/*.test.ts\" --reporter \"list\"",
1212
"doc": "typedoc --out ./doc --excludeExternals --exclude \"**/*+(.test).ts\""
@@ -36,8 +36,8 @@
3636
"tslint-loader": "^3.4.3",
3737
"typedoc": "^0.5.10",
3838
"typescript": "^2.3.0",
39-
"webpack": "^2.2.1",
40-
"webpack-dev-server": "^2.4.2"
39+
"webpack": "^3.5.6",
40+
"webpack-dev-server": "^2.7.1"
4141
},
4242
"dependencies": {
4343
"@types/geojson": "^1.0.2",

webpack.config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = {
2525
}
2626
},
2727
{
28-
test: /\.tsx?$/,
28+
test: /\.ts$/,
2929
loader: 'ts-loader',
3030
exclude: /node_modules/
3131
},
@@ -36,10 +36,10 @@ module.exports = {
3636
},
3737
{
3838
enforce: 'pre',
39-
test: /\.tsx?$/,
39+
test: /\.ts$/,
4040
use: "source-map-loader"
4141
}
42-
]
42+
]
4343
},
4444
resolve: {
4545
extensions: [".tsx", ".ts", ".js"]

webpack.prod.config.js

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
var webpack = require('webpack');
2-
var path = require("path");
32
var OptimizeJsPlugin = require('optimize-js-plugin');
43
var cloneDeep = require('lodash.clonedeep');
54

@@ -16,14 +15,14 @@ var baseConfig = {
1615
module: {
1716
rules: [
1817
{
19-
test: /\.tsx?$/,
18+
test: /\.ts$/,
2019
loader: 'ts-loader',
2120
exclude: /node_modules/
22-
}
21+
},
2322
]
2423
},
2524
resolve: {
26-
extensions: [".tsx", ".ts", ".js"]
25+
extensions: [".ts", ".js"]
2726
},
2827
plugins: [
2928
new OptimizeJsPlugin({
@@ -34,26 +33,9 @@ var baseConfig = {
3433
debug: false
3534
}),
3635
new webpack.optimize.UglifyJsPlugin({
37-
beautify: false,
38-
mangle: {
39-
screw_ie8: true,
40-
keep_fnames: true
41-
},
42-
compress: {
43-
screw_ie8: true,
44-
warnings: false,
45-
conditionals: true,
46-
unused: true,
47-
comparisons: true,
48-
sequences: true,
49-
dead_code: true,
50-
evaluate: true,
51-
if_return: true,
52-
join_vars: true,
53-
negate_iife: false
54-
},
55-
comments: false,
56-
sourceMap: false
36+
output: {
37+
comments: false
38+
}
5739
})
5840
]
5941
};

0 commit comments

Comments
 (0)