coc-tsserver/webpack.config.js

42 lines
727 B
JavaScript
Raw Normal View History

2019-06-20 08:36:12 +09:00
const path = require('path')
module.exports = {
entry: './src/index.ts',
target: 'node',
mode: 'none',
resolve: {
mainFields: ['module', 'main'],
extensions: ['.js', '.ts']
},
externals: {
'coc.nvim': 'commonjs coc.nvim',
'typescript': 'commonjs typescript'
},
module: {
rules: [{
test: /\.ts$/,
exclude: /node_modules/,
use: [{
loader: 'ts-loader',
options: {
compilerOptions: {
"sourceMap": true,
}
}
}]
}]
},
output: {
path: path.join(__dirname, 'lib'),
filename: 'index.js',
libraryTarget: "commonjs",
},
plugins: [
],
node: {
__dirname: false,
__filename: false
}
}