-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathwebpack.config.js
40 lines (39 loc) · 943 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
const CopyPlugin = require('copy-webpack-plugin');
const TerserPlugin = require("terser-webpack-plugin");
const path = require('path');
module.exports = {
mode: "development",
entry: "./src/app.ts",
resolve: {
extensions: ['.ts', '.js']
},
target: ['web', 'es6'],
output: {
filename: "app.bundle.js",
path: path.join(__dirname, 'dist'),
clean: true
},
devtool: "source-map",
module: {
rules: [
{
test: /\.ts$/,
loader: "ts-loader",
exclude: /node_modules/,
}
]
},
optimization: {
minimize: true,
minimizer: [new TerserPlugin()],
},
plugins: [
new CopyPlugin({
patterns: [{
from: path.join(__dirname, 'static'),
to: path.join(__dirname, 'dist')
}],
})
],
stats: 'verbose'
};