Skip to content

Commit d7f5f0a

Browse files
committed
add typings for webpack
1 parent 5f63abc commit d7f5f0a

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@
260260
"@types/lodash": "^4.14.106",
261261
"@types/mocha": "^5.2.2",
262262
"@types/node": "*",
263+
"@types/webpack": "^4.4.10",
263264
"css-loader": "^0.28.11",
264265
"del": "^3.0.0",
265266
"gulp": "3.9.1",

webpack.config.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@
22
* Copyright (c) Microsoft Corporation. All rights reserved.
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
5+
6+
//@ts-check
7+
58
const path = require('path');
9+
const webpack = require('webpack');
610

7-
module.exports = [{
11+
/** @type webpack.Configuration */
12+
const webview = {
13+
name: 'webiew',
814
entry: {
915
index: './preview-src/index.ts'
1016
},
@@ -29,7 +35,11 @@ module.exports = [{
2935
filename: '[name].js',
3036
path: path.resolve(__dirname, 'media')
3137
}
32-
}, {
38+
};
39+
40+
/** @type webpack.Configuration */
41+
const extension = {
42+
name: 'extension',
3343
target: 'node',
3444
entry: {
3545
extension: './src/extension.ts'
@@ -59,4 +69,6 @@ module.exports = [{
5969
externals: {
6070
'vscode': 'commonjs vscode',
6171
},
62-
}];
72+
};
73+
74+
module.exports = [webview, extension];

yarn.lock

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,25 @@
5656
version "10.3.2"
5757
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.3.2.tgz#3840ec6c12556fdda6e0e6d036df853101d732a4"
5858

59+
"@types/tapable@*":
60+
version "1.0.4"
61+
resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370"
62+
63+
"@types/uglify-js@*":
64+
version "3.0.3"
65+
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.3.tgz#801a5ca1dc642861f47c46d14b700ed2d610840b"
66+
dependencies:
67+
source-map "^0.6.1"
68+
69+
"@types/webpack@^4.4.10":
70+
version "4.4.10"
71+
resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.4.10.tgz#2ecf12589142bc531549140612815b7d8b076358"
72+
dependencies:
73+
"@types/node" "*"
74+
"@types/tapable" "*"
75+
"@types/uglify-js" "*"
76+
source-map "^0.6.0"
77+
5978
"@types/ws@^5.1.2":
6079
version "5.1.2"
6180
resolved "https://registry.yarnpkg.com/@types/ws/-/ws-5.1.2.tgz#f02d3b1cd46db7686734f3ce83bdf46c49decd64"

0 commit comments

Comments
 (0)