insomnia/packages/insomnia-inso/webpack/webpack.config.base.js

27 lines
546 B
JavaScript
Raw Normal View History

const path = require('path');
const nodeExternals = require('webpack-node-externals');
module.exports = {
entry: { index: './src/cli.js' },
target: 'node',
devtool: 'source-map',
output: {
path: path.resolve(__dirname, '..', 'dist'),
filename: '[name].js',
library: 'insomniacli',
libraryTarget: 'commonjs2',
},
module: {
rules: [
{
test: /\.js$/,
exclude: [/node_modules/],
use: {
loader: 'babel-loader',
},
},
],
},
externals: [nodeExternals()],
};