const path = require('path');

module.exports = {
    entry: './src/client/index.ts',
    target: 'web',
    mode: 'development',
    devtool: 'source-map',
    module: {
        rules: [
            {
                test: /\.tsx?$/,
                use: {
                    loader: 'ts-loader',
                    options: { configFile: 'tsconfig.client.json' },
                },
                exclude: /node_modules/,
            },
        ],
    },
    resolve: {
        extensions: ['.tsx', '.ts', '.js'],
        alias: {
            shared: path.resolve(__dirname, 'src/shared'),
        },
    },
    output: {
        filename: 'index.js',
        path: path.resolve(__dirname, 'dist/client'),
    },
};
