UNPKG

774 BJavaScriptView Raw
1const path = require('path')
2
3/** @type {import('webpack').Configuration} */
4module.exports = {
5 entry: {
6 index: './src/index.ts',
7 scan: './src/server/scan.ts',
8 'build-docs': './src/script/build-docs.ts'
9 },
10 target: 'node',
11 mode: 'none',
12 resolve: {
13 mainFields: ['module', 'main'],
14 extensions: ['.js', '.ts']
15 },
16 externals: {
17 'coc.nvim': 'commonjs coc.nvim'
18 },
19 module: {
20 rules: [
21 {
22 test: /\.ts$/,
23 exclude: /node_modules/,
24 use: [
25 {
26 loader: 'ts-loader'
27 }
28 ]
29 }
30 ]
31 },
32 output: {
33 path: path.join(__dirname, 'out'),
34 filename: '[name].js',
35 libraryTarget: 'commonjs'
36 },
37 plugins: [],
38 node: {
39 __dirname: false,
40 __filename: false
41 }
42}