forked from encounterplus/module-packer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.extension.config.js
More file actions
56 lines (53 loc) · 1.31 KB
/
webpack.extension.config.js
File metadata and controls
56 lines (53 loc) · 1.31 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//@ts-check
'use strict';
const path = require('path');
/**@type {import('webpack').Configuration}*/
const config = {
target: 'node',
entry: './vscode-extension/extension.ts',
output: {
path: path.resolve(__dirname, 'extension-out/vscode-extension'),
filename: 'extension-packed.js',
libraryTarget: 'commonjs2',
devtoolModuleFilenameTemplate: '../../[resource-path]'
},
optimization: {
minimize: false
},
node: {
__dirname: false
},
devtool: 'source-map',
externals: {
vscode: 'commonjs vscode',
'markdown-it-anchor': 'markdown-it-anchor',
'markdown-it-attrs': 'markdown-it-attrs',
'markdown-it-decorate': 'markdown-it-decorate',
'markdown-it-imsize': 'markdown-it-imsize',
'markdown-it-mark': 'markdown-it-mark',
'markdown-it-multimd-table': 'markdown-it-multimd-table',
'markdown-it-sub': 'markdown-it-sub',
'markdown-it-sup': 'markdown-it-sup',
'markdown-it-underline': 'markdown-it-underline',
},
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
exclude: /node_modules/,
use: [
{
loader: 'ts-loader',
options: {
configFile: "tsconfig.extension.json"
}
}
]
}
]
}
};
module.exports = config;