-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathwebpack.config.worker.js
48 lines (47 loc) · 1.03 KB
/
webpack.config.worker.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
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
module.exports = {
mode: 'production',
entry: {
"transform_worker": "./src/gis/core/transform/worker_transform_index.ts",
},
output: {
path: __dirname + '/src/gis/core/worker',
filename: '[name].js',
library: '[name]'
},
//不打包THREE
externals: {
three: 'THREE'
},
resolve: {
extensions: ['.ts', '.tsx', '.js']
},
plugins: [
new UglifyJSPlugin({
uglifyOptions: {
ie8: true,
ecma: 5,
warnings: false,
output: {
beautify: false
}
}
}),
],
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
watch: false,
devServer: {
compress: true,
historyApiFallback: true,
hot: true,
port: 8866,
}
}