forked from webview-crypto/webview-crypto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.js
41 lines (37 loc) · 962 Bytes
/
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
var failPlugin = require('webpack-fail-plugin');
var webpack = require('webpack');
var WebpackShellPlugin = require('webpack-shell-plugin');
module.exports = {
entry: ['./src/WebViewWorker'],
output: {
filename: "src/webViewWorkerDist.js",
libraryTarget: "var",
library: "WebViewWorker"
},
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
extensions: ["", ".webpack.js", ".web.js", ".ts", ".tsx", ".js"]
},
module: {
loaders: [
// All files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'.
{ test: /\.tsx?$/, loader: "ts-loader" }
]
},
ts: {
configFile: "tsconfig.webViewWorker.json"
},
plugins: [
failPlugin,
new webpack.optimize.UglifyJsPlugin({
compress: true,
mangle: true,
comments: false,
sourceMap: false
}),
new WebpackShellPlugin({
onBuildEnd:['./build-webViewWorkerString.bash'],
dev: false
})
]
};