32 lines
679 B
JavaScript
32 lines
679 B
JavaScript
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'),
|
|
},
|
|
};
|