forked from microsoft/powerplatform-vscode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebpack.config.js
56 lines (51 loc) · 1.61 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
44
45
46
47
48
49
50
51
52
53
54
55
56
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
'use strict';
/* eslint-disable no-undef */
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
/**@type {import('webpack').Configuration}*/
const config = {
target: 'node',
mode: 'development',
entry: {
extension:'./src/client/extension.ts',
yamlServer: './src/server/yamlServer.ts',
htmlServer: './src/server/htmlServer.ts'
},
output: {
path: path.resolve(__dirname,'dist'),
filename: '[name].js',
libraryTarget: "commonjs2",
},
devtool: 'source-map',
externals: {
vscode: "commonjs vscode",
// These dependencies are ignored because we don't use them, and App Insights has try-catch protecting their loading if they don't exist
// See: https://github.com/microsoft/vscode-extension-telemetry/issues/41#issuecomment-598852991
'applicationinsights-native-metrics': 'commonjs applicationinsights-native-metrics',
'@opentelemetry/tracing': "commonjs @opentelemetry/tracing"
},
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [{
test: /\.ts$/,
exclude: /node_modules/,
use: [{
// vscode-nls-dev loader:
// * rewrite nls-calls
loader: 'vscode-nls-dev/lib/webpack-loader',
options: {
base: __dirname
}
},
{
loader: 'ts-loader'
}
]
}]
},
}
module.exports = config;