Blorg-Frontend/webpack.config.js

32 lines
587 B
JavaScript

const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
module.exports = {
entry: "./src/index.tsx",
output: {
filename: "main.js",
path: path.resolve(__dirname, "dist"),
publicPath: "/",
},
devServer: {
historyApiFallback: true,
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
use: "babel-loader",
},
{
test: /\.css$/,
use: [ 'style-loader', 'css-loader' ]
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: "./src/index.html",
}),
],
};