-
Notifications
You must be signed in to change notification settings - Fork 343
/
webpack.config.js
43 lines (41 loc) · 1.25 KB
/
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
42
43
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
const path = require('path');
module.exports = function (env, argv) {
env = env || {};
return [{
name: 'extension',
target: 'node',
mode: 'none',
entry: {
extension: './src/extension.ts'
},
module: {
rules: [{
test: /\.ts$/,
exclude: /node_modules/,
use: 'ts-loader'
}]
},
resolve: {
modules: ['node_modules', path.resolve(__dirname, 'src')],
mainFiles: ['index'],
extensions: ['.js', '.ts', '.json']
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist'),
libraryTarget: "commonjs2",
publicPath: '/',
devtoolModuleFilenameTemplate: "../[resource-path]"
},
externals: {
'applicationinsights-native-metrics': 'commonjs applicationinsights-native-metrics', // ignored because we don't ship native module
vscode: 'commonjs vscode'
},
devtool: 'source-map',
infrastructureLogging: {
level: 'log'
}
}];
};