hblang-vscode/webpack.config.js

34 lines
583 B
JavaScript

const path = require('path');
module.exports = {
mode: 'production',
entry: './src/main.ts',
output: {
path: path.resolve(__dirname, 'out'),
filename: 'main.js',
libraryTarget: 'commonjs2'
},
resolve: {
extensions: ['.ts', '.js'],
fallback: {
"child_process": false,
"fs": false,
"os": require.resolve("os-browserify/browser"),
"path": require.resolve("path-browserify"),
},
},
externals: {
vscode: 'commonjs vscode'
},
module: {
rules: [
{
test: /\.ts$/,
use: 'ts-loader',
exclude: /node_modules/
}
]
},
target: 'node'
};