Files
AdPlatform-Client/Client-Admin/webpack.config.js
2026-02-03 15:45:39 -08:00

39 lines
869 B
JavaScript

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.js',
},
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: 'babel-loader',
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
],
},
resolve: {
extensions: ['.js', '.jsx'],
},
plugins: [
new HtmlWebpackPlugin({
template: './public/index.html',
inject: 'body',
}),
],
devServer: {
static: './public',
port: 3000,
hot: true,
historyApiFallback: true,
},
};