insomnia/packages/insomnia-inso/webpack/webpack.config.base.js
John Chadwick 914bcf30ed
Apple M1 support (#4140)
* Apple M1 support

* Fix appUrl calculation.

* adds guard for targetPlatform

Co-Authored-By: John Chadwick <john.chadwick@konghq.com>

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-01-12 16:31:33 -05:00

36 lines
731 B
JavaScript

const path = require('path');
const nodeExternals = require('webpack-node-externals');
/** @type { import('webpack').Configuration } */
module.exports = {
entry: './src/index.ts',
target: 'node',
stats: 'minimal',
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: [
'@getinsomnia/node-libcurl',
'mocha',
nodeExternals(),
],
};