-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
webpack.config.js
40 lines (38 loc) ยท 1.07 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
//@ts-check
'use strict';
const path = require('path');
/**@type {import('webpack').Configuration}*/
const extensionConfig = {
target: 'node', // see: https://webpack.js.org/configuration/node/
mode: 'none', // this leaves the source code as close as possible to the original
entry: './src/extension.ts', // see: https://webpack.js.org/configuration/entry-context/
output: {
// see: https://webpack.js.org/configuration/output/
path: path.resolve(__dirname, 'dist'),
filename: 'extension.js',
libraryTarget: 'commonjs2',
},
devtool: 'nosources-source-map',
externals: {
vscode: 'commonjs vscode' // see: https://webpack.js.org/configuration/externals/
// modules added here also need to be added in the .vsceignore file
},
resolve: {
// see: https://github.com/TypeStrong/ts-loader
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader'
}
]
}
]
}
};
module.exports = [extensionConfig];