Files
Prompter/webpack.config.js
2025-03-13 08:00:45 +00:00

47 lines
1005 B
JavaScript

const path = require('path');
const webpack = require('webpack');
/**
* @type {import('webpack').Configuration}
*/
const config = {
target: 'node',
mode: 'none', // Set to 'production' for minified output
entry: {
main: './src/extension.ts'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'extension.js',
libraryTarget: 'commonjs2',
devtoolModuleFilenameTemplate: '../[resource-path]'
},
devtool: 'source-map',
externals: {
vscode: 'commonjs vscode' // The vscode module is created on-the-fly and must be excluded
},
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules|src\/test/,
use: [
{
loader: 'ts-loader',
options: {
transpileOnly: true,
configFile: path.resolve(__dirname, './tsconfig.webpack.json')
}
}
]
}
]
}
};
module.exports = config;