mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-04-27 16:55:44 +08:00
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
/*---------------------------------------------------------------------------------------------
|
|
* 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",
|
|
devtoolModuleFilenameTemplate: "../[resource-path]",
|
|
},
|
|
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;
|