Files
actest/webpack.config.js
sebseb7 6944111f84 u
2025-12-21 01:06:59 +01:00

47 lines
1.1 KiB
JavaScript

import path from 'path';
import { fileURLToPath } from 'url';
import HtmlWebpackPlugin from 'html-webpack-plugin';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default {
mode: 'development',
entry: './src/client/index.js',
output: {
path: path.resolve(__dirname, 'dist'),
filename: 'bundle.[contenthash].js',
publicPath: '/ac/',
clean: true // Clean dist folder on rebuild
},
module: {
rules: [
{
test: /\.m?js/,
resolve: {
fullySpecified: false
}
},
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader'
}
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: './src/client/index.html'
})
],
resolve: {
extensions: ['.js', '.jsx']
}
};