forked from microsoft/rushstack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
30 lines (24 loc) · 803 Bytes
/
webpack.config.js
File metadata and controls
30 lines (24 loc) · 803 Bytes
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
// @ts-check
/* eslint-env es6 */
'use strict';
const {
createExtensionConfig
} = require('@rushstack/heft-vscode-extension-rig/profiles/default/webpack.config.base');
const path = require('node:path');
function createConfig({ production, webpack }) {
const config = createExtensionConfig({
production: false,
webpack,
entry: {
extension: './lib/extension.js'
},
outputPath: `${__dirname}/dist/vsix/unpacked`
});
// Mark problematic modules as externals to avoid webpack bundling issues
const externals = /** @type {Record<string, string>} */ (config.externals || {});
externals['bufferutil'] = 'commonjs bufferutil';
externals['utf-8-validate'] = 'commonjs utf-8-validate';
config.externals = externals;
return config;
}
module.exports = createConfig;