Files
bf-server/client/webpack.config.js

58 lines
1.5 KiB
JavaScript
Raw Permalink Normal View History

//@ts-check
'use strict';
const path = require('path');
// const {} = require('webpack');
/**@type {import('webpack').Configuration}*/
const config = {
target: 'node', // vscode extensions run in a Node.js-context 📖 -> https://webpack.js.org/configuration/node/
entry: {
extension:path.join(__dirname,'src','extension.ts'),
}, // the entry point of this extension, 📖 -> https://webpack.js.org/configuration/entry-context/
output: {
// the bundle is stored in the 'dist' folder (check package.json), 📖 -> https://webpack.js.org/configuration/output/
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',
libraryTarget: 'commonjs2',
2025-07-20 03:36:43 +01:00
sourceMapFilename: '[name].js.map',
devtoolModuleFilenameTemplate: '../[resource-path]',
},
2021-04-18 11:52:42 +05:30
// devtool: 'source-map',
externals: {
vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, 📖 -> https://webpack.js.org/configuration/externals/
},
2021-04-18 11:52:42 +05:30
optimization:{
minimize:true,
innerGraph:true,
usedExports:true
},
2025-07-20 03:36:43 +01:00
resolve: {
// support reading TypeScript and JavaScript files, 📖 -> https://github.com/TypeStrong/ts-loader
extensions: ['.ts', '.js'],
plugins:[]
},
2021-04-18 11:52:42 +05:30
// stats:'minimal',
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader',
options:{
configFile : 'tsconfig.json'
}
}
],
}
]
},
};
module.exports = config;