Files
vscode-extension-samples/webpack-sample/webpack.config.js

40 lines
1019 B
JavaScript
Raw Normal View History

2018-09-19 17:54:55 +02:00
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
'use strict';
const path = require('path');
/**@type {import('webpack').Configuration}*/
const config = {
target: 'node',
entry: './src/extension.ts',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'extension.js',
libraryTarget: "commonjs2"
},
resolve: {
extensions: ['.ts', '.tsx', '.js']
},
devtool: 'source-map',
externals: {
vscode: "vscode"
},
module: {
rules: [{
test: /\.ts$/,
exclude: /node_modules/,
use: [{
loader: 'ts-loader',
}]
}]
},
}
module.exports = config;