55
66'use strict' ;
77
8- const path = require ( 'path ' ) ;
8+ const sharedConfig = require ( '../shared.webpack.config ' ) ;
99const CopyWebpackPlugin = require ( 'copy-webpack-plugin' ) ;
1010
11- module . exports = {
12- // mode: 'production',
13- // stats: 'errors-only',
14- mode : 'none' ,
15- context : __dirname ,
16- target : 'node' ,
11+ const myConfig = {
1712 node : {
18- __dirname : false
13+ __dirname : false // leave the __dirname-behaviour intact
1914 } ,
2015 entry : {
2116 main : './src/main.ts' ,
2217 [ 'askpass-main' ] : './src/askpass-main.ts'
2318 } ,
24- resolve : {
25- mainFields : [ 'main' ] ,
26- extensions : [ ".ts" , ".js" ]
27- } ,
28- module : {
29- rules : [ {
30- test : / \. t s $ / ,
31- exclude : / n o d e _ m o d u l e s / ,
32- use : [ {
33- loader : 'ts-loader' ,
34- options : {
35- transpileOnly : true ,
36- compilerOptions : {
37- "sourceMap" : true ,
38- }
39- }
40- } ]
41- } ]
42- } ,
43- output : {
44- filename : '[name].js' ,
45- path : path . join ( __dirname , 'dist' ) ,
46- libraryTarget : "commonjs"
47- } ,
4819 plugins : [
4920 new CopyWebpackPlugin ( [
5021 { from : './out/*.sh' , to : '[name].sh' } ,
5122 { from : './out/nls.*.json' , to : '[name].json' }
5223 ] )
5324 ] ,
54- devtool : 'source-map' ,
5525 externals : {
56- 'vscode' : 'commonjs vscode' ,
26+ 'vscode' : 'commonjs vscode' , // ignored because it doesn't exist
5727 "byline" : 'commonjs byline' ,
5828 "file-type" : 'commonjs file-type' ,
5929 "iconv-lite" : 'commonjs iconv-lite' ,
@@ -63,3 +33,5 @@ module.exports = {
6333 "which" : 'commonjs which' ,
6434 } ,
6535} ;
36+
37+ module . exports = { ...sharedConfig ( __dirname ) , ...myConfig } ;
0 commit comments