mirror of
https://github.com/microsoft/vscode-extension-samples.git
synced 2026-06-13 07:10:26 +08:00
improve typing of webpack.config.js
This commit is contained in:
@ -12,7 +12,8 @@
|
||||
const path = require('path');
|
||||
const webpack = require('webpack');
|
||||
|
||||
const webExtensionConfig = /** @type WebpackConfig */ {
|
||||
/** @type WebpackConfig */
|
||||
const webExtensionConfig = {
|
||||
mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
|
||||
target: 'webworker', // extensions run in a webworker context
|
||||
entry: {
|
||||
|
||||
@ -13,7 +13,8 @@
|
||||
|
||||
const path = require('path');
|
||||
|
||||
const browserClientConfig = /** @type WebpackConfig */ {
|
||||
/** @type WebpackConfig */
|
||||
const browserClientConfig = {
|
||||
context: path.join(__dirname, 'client'),
|
||||
mode: 'none',
|
||||
target: 'webworker', // web extensions run in a webworker context
|
||||
@ -55,7 +56,8 @@ const browserClientConfig = /** @type WebpackConfig */ {
|
||||
devtool: 'source-map',
|
||||
};
|
||||
|
||||
const browserServerConfig = /** @type WebpackConfig */ {
|
||||
/** @type WebpackConfig */
|
||||
const browserServerConfig = {
|
||||
context: path.join(__dirname, 'server'),
|
||||
mode: 'none',
|
||||
target: 'webworker', // web extensions run in a webworker context
|
||||
|
||||
Reference in New Issue
Block a user