irongit

A Regex file extension that makes it way easier to edit large regex.

regex-file/webpack.config.js
48 lines1.6 KBJavaScript
1//@ts-check
2
3'use strict';
4
5const path = require('path');
6
7//@ts-check
8/** @typedef {import('webpack').Configuration} WebpackConfig **/
9
10/** @type WebpackConfig */
11const extensionConfig = {
12 target: 'node', // VS Code extensions run in a Node.js-context ๐Ÿ“– -> https://webpack.js.org/configuration/node/
13 mode: 'none', // this leaves the source code as close as possible to the original (when packaging we set this to 'production')
14
15 entry: './src/extension.ts', // the entry point of this extension, ๐Ÿ“– -> https://webpack.js.org/configuration/entry-context/
16 output: {
17 // the bundle is stored in the 'dist' folder (check package.json), ๐Ÿ“– -> https://webpack.js.org/configuration/output/
18 path: path.resolve(__dirname, 'dist'),
19 filename: 'extension.js',
20 libraryTarget: 'commonjs2'
21 },
22 externals: {
23 vscode: 'commonjs vscode' // the vscode-module is created on-the-fly and must be excluded. Add other modules that cannot be webpack'ed, ๐Ÿ“– -> https://webpack.js.org/configuration/externals/
24 // modules added here also need to be added in the .vscodeignore file
25 },
26 resolve: {
27 // support reading TypeScript and JavaScript files, ๐Ÿ“– -> https://github.com/TypeStrong/ts-loader
28 extensions: ['.ts', '.js']
29 },
30 module: {
31 rules: [
32 {
33 test: /\.ts$/,
34 exclude: /node_modules/,
35 use: [
36 {
37 loader: 'ts-loader'
38 }
39 ]
40 }
41 ]
42 },
43 devtool: 'nosources-source-map',
44 infrastructureLogging: {
45 level: "log", // enables logging required for problem matchers
46 },
47};
48module.exports = [ extensionConfig ];