forked from cweijan/vscode-database-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webpack.config.lib.js
43 lines (41 loc) · 1.25 KB
/
webpack.config.lib.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
const path = require('path');
var webpack = require('webpack');
// 1. npm i tedious node-xlsx
// 2. npm run lib
module.exports = [
{
target: "node",
node: {
fs: 'empty', net: 'empty', tls: 'empty',
child_process: 'empty', dns: 'empty',
global: true, __dirname: true
},
entry: {
'node-xlsx': './node_modules/node-xlsx/lib/index.js',
tedious: './node_modules/tedious/lib/tedious.js',
} ,
output: {
path: path.resolve(__dirname, 'src/bin'),
filename: '[name].js',
libraryTarget: 'commonjs2'
},
externals: {
vscode: 'commonjs vscode'
},
resolve: {
extensions: ['.ts', '.js'],
alias: {
'@': path.resolve(__dirname, './src'),
'~': path.resolve(__dirname, './src')
}
},
plugins: [
new webpack.IgnorePlugin(/^(pg-native|supports-color|mongodb-client-encryption)$/)
],
module: { rules: [{ test: /\.ts$/, exclude: /node_modules/, use: ['ts-loader'] }] },
optimization: { minimize: true },
watch: false,
mode: 'production',
devtool: false,
}
];