kidshift-skills/webpack.config.ts

30 lines
674 B
TypeScript
Raw Normal View History

2024-07-15 18:08:19 +00:00
import * as path from 'path';
import * as webpack from 'webpack';
import webpackNodeExternals = require('webpack-node-externals');
const config: webpack.Configuration = {
entry: './src/index.ts',
mode: 'development',
target: 'node',
externals: [webpackNodeExternals()],
devtool: 'inline-source-map',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
output: {
filename: 'index.js',
2024-07-15 19:52:22 +00:00
path: path.resolve(__dirname, 'lambda'),
2024-07-15 18:08:19 +00:00
library: 'index',
libraryTarget: 'commonjs2',
},
};
export default config;