-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwebpack.config.js
More file actions
44 lines (42 loc) · 928 Bytes
/
Copy pathwebpack.config.js
File metadata and controls
44 lines (42 loc) · 928 Bytes
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
const TerserPlugin = require('terser-webpack-plugin')
const path = require('path')
const TsConfigPathsPlugin = require('tsconfig-paths-webpack-plugin')
const {
CheckerPlugin
} = require('awesome-typescript-loader')
const webConfig = {
mode: 'production',
entry: './src/index.ts',
target: 'web',
output: {
path: path.resolve(__dirname, './dist'),
filename: 'tezmania.min.js',
library: 'tezmania',
libraryTarget: 'umd'
},
resolve: {
extensions: ['.ts', '.tsx', '.js'],
plugins: [
new TsConfigPathsPlugin({
configFile: './tsconfig.json'
})
]
},
module: {
rules: [{
test: /\.tsx?$/,
loader: 'awesome-typescript-loader'
}]
},
node: {
child_process: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty'
},
plugins: [new CheckerPlugin()],
optimization: {
minimizer: [new TerserPlugin()]
}
}
module.exports = [webConfig]