TDMS/web/webpack.config.js
2025-02-09 10:59:44 +03:00

49 lines
1.1 KiB
JavaScript

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
mode: 'development',
entry: {
app: path.join(__dirname, 'src', 'Application.tsx')
},
target: 'web',
resolve: {
extensions: ['.ts', '.tsx', '.js']
},
module: {
rules: [
{
test: /\.tsx?$/,
use: 'ts-loader',
exclude: '/node_modules/'
},
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
],
},
output: {
filename: '[name].js',
path: path.resolve(__dirname, 'dist')
},
devServer: {
client: {
overlay: {
errors: true,
warnings: false,
runtimeErrors: false,
},
},
historyApiFallback: true,
static: path.join(__dirname, "dist"),
compress: true,
port: 8888,
},
plugins: [
new HtmlWebpackPlugin({
template: path.join(__dirname, 'src', 'index.html')
})
]
}