forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.debugadapter.config.js
More file actions
64 lines (64 loc) · 1.94 KB
/
webpack.debugadapter.config.js
File metadata and controls
64 lines (64 loc) · 1.94 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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
'use strict';
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const tsconfig_paths_webpack_plugin_1 = require("tsconfig-paths-webpack-plugin");
const constants_1 = require("../constants");
const common_1 = require("./common");
// tslint:disable-next-line:no-var-requires no-require-imports
const configFileName = path.join(constants_1.ExtensionRootDir, 'tsconfig.extension.json');
const config = {
mode: 'production',
target: 'node',
entry: {
'debugger/debugAdapter/main': './src/client/debugger/debugAdapter/main.ts'
},
devtool: 'source-map',
node: {
__dirname: false
},
module: {
rules: [
{
// JupyterServices imports node-fetch using `eval`.
test: /@jupyterlab[\\\/]services[\\\/].*js$/,
use: [
{
loader: path.join(__dirname, 'loaders', 'fixEvalRequire.js')
}
]
},
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader'
}
]
}
]
},
externals: [
'vscode',
'commonjs'
],
plugins: [
...common_1.getDefaultPlugins('extension')
],
resolve: {
extensions: ['.ts', '.js'],
plugins: [
new tsconfig_paths_webpack_plugin_1.TsconfigPathsPlugin({ configFile: configFileName })
]
},
output: {
filename: '[name].js',
path: path.resolve(constants_1.ExtensionRootDir, 'out', 'client'),
libraryTarget: 'commonjs2',
devtoolModuleFilenameTemplate: '../../[resource-path]'
}
};
// tslint:disable-next-line:no-default-export
exports.default = config;