-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
69 lines (67 loc) · 1.73 KB
/
Copy pathwebpack.config.js
File metadata and controls
69 lines (67 loc) · 1.73 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
const path = require('path');
const CopyPlugin = require('copy-webpack-plugin');
// The agent tasks are TypeScript compiled in-place by tsc; this copy step picks
// up the emitted index.js. The .ts sources, tests, tsconfig and dev node_modules
// are excluded; the production node_modules are installed into dist/ afterwards.
const taskIgnore = [
'**/node_modules/**',
'**/.DS_Store',
'**/*.ts',
'**/tsconfig.json',
'**/tests/**',
'**/*.js.map'
];
module.exports = {
target: 'web',
entry: {
info: './tb-build-info/scripts/info.ts',
dialog: './tb-build-info/scripts/dialog.ts'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'tb-build-info/scripts/[name].js',
clean: false
},
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env', '@babel/preset-typescript']
}
}
}
]
},
plugins: [
new CopyPlugin({
patterns: [
{ from: 'images', to: 'images' },
{ from: 'overview.md', to: 'overview.md' },
{ from: 'vss-extension.json', to: 'vss-extension.json' },
{
from: 'tb-main',
to: 'tb-main',
globOptions: { ignore: taskIgnore }
},
{
from: 'tb-stop-tunnel',
to: 'tb-stop-tunnel',
globOptions: { ignore: taskIgnore }
},
{
// Everything in tb-build-info except the scripts webpack bundles above.
from: 'tb-build-info',
to: 'tb-build-info',
globOptions: { ignore: ['**/scripts/**', '**/.DS_Store'] }
}
]
})
]
};