mirror of
https://github.com/Kong/insomnia
synced 2024-11-08 14:49:53 +00:00
5f4c19da35
Co-authored-by: Opender Singh <opender.singh@konghq.com>
35 lines
698 B
JavaScript
35 lines
698 B
JavaScript
const path = require('path');
|
|
const nodeExternals = require('webpack-node-externals');
|
|
|
|
/** @type { import('webpack').Configuration } */
|
|
module.exports = {
|
|
entry: './src/index.ts',
|
|
target: 'node',
|
|
output: {
|
|
path: path.resolve(__dirname, '..', 'dist'),
|
|
filename: 'index.js',
|
|
library: 'insomniacli',
|
|
libraryTarget: 'commonjs2',
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.tsx?$/,
|
|
loader: 'ts-loader',
|
|
exclude: [/node_modules/],
|
|
options: {
|
|
configFile: 'tsconfig.build.json',
|
|
},
|
|
},
|
|
],
|
|
},
|
|
resolve: {
|
|
extensions: ['.js', '.ts'],
|
|
},
|
|
externals: [
|
|
'node-libcurl',
|
|
'mocha',
|
|
nodeExternals(),
|
|
],
|
|
};
|