-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathwebpack.config.js
35 lines (34 loc) · 1.01 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
const path = require('path');
module.exports = (env) => ({
target: 'node',
mode: (env.prod) ? "production" : "development",
devtool: (env.prod) ? 'source-map' : 'inline-source-map', // inline-source-map makes debugging work better.
optimization: {
minimize: env.prod ? true : false // Debugger has trouble if you minify, even with the source map.
},
entry: './src/extension.ts',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'extension.js',
libraryTarget: "commonjs2",
devtoolModuleFilenameTemplate: "../[resource-path]",
},
externals: {
vscode: "commonjs vscode"
},
resolve: {
extensions: ['.ts', '.js'],
},
module: {
rules: [{
test: /\.ts$/,
exclude: /node_modules/,
use: [{
loader: 'ts-loader',
options: {
configFile: path.resolve(__dirname, 'src/tsconfig.json'),
}
}]
}]
},
});