-
Notifications
You must be signed in to change notification settings - Fork 132
/
Copy pathwebpack.config.js
42 lines (34 loc) · 1.27 KB
/
webpack.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
//@ts-check
// See https://github.com/Microsoft/vscode-azuretools/wiki/webpack for guidance
'use strict';
const process = require('process');
const dev = require("vscode-azureextensiondev");
const CopyWebpackPlugin = require('copy-webpack-plugin');
let DEBUG_WEBPACK = !!process.env.DEBUG_WEBPACK;
let config = dev.getDefaultWebpackConfig({
entries: {
cloudConsoleLauncher: './src/cloudConsole/cloudConsoleLauncher.ts',
},
projectRoot: __dirname,
verbosity: DEBUG_WEBPACK ? 'debug' : 'normal',
externals: {
bufferutil: 'commonjs bufferutil',
'utf-8-validate': 'commonjs utf-8-validate',
'./platform/openbsd': 'commonjs copy-paste-openbsd',
},
plugins: [
new CopyWebpackPlugin({
patterns: [
{ from: './out/src/utils/getCoreNodeModule.js', to: 'node_modules' }
]
})
]
});
if (DEBUG_WEBPACK) {
console.log('Config:', config);
}
module.exports = config;