chatbridge/client/config/webpack.common.js

33 lines
679 B
JavaScript
Raw Normal View History

2023-07-25 23:00:45 +00:00
const path = require('path');
const HtmlWebPackPlugin = require( 'html-webpack-plugin' );
module.exports = {
entry: './src/index.tsx',
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.(png|j?g|svg|gif|mp3)?$/,
use: [require.resolve('file-loader')]
}
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
plugins: [
new HtmlWebPackPlugin({
template: path.resolve( __dirname, '../public/index.html' ),
title: "ChatBridge"
}),
],
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, '../dist'),
},
};