odin-codespace/file-uploader/webpack.config.js
2025-04-06 06:07:02 -04:00

29 lines
682 B
JavaScript

const HtmlWebpackPlugin = require('html-webpack-plugin');
const path = require('path');
module.exports = {
mode: 'development',
entry: './src/index.js',
output: {
filename: 'main.js',
path: path.resolve(__dirname, 'dist'),
clean: true,
},
plugins: [
new HtmlWebpackPlugin({
template: './src/views/main.ejs',
}),
],
module: {
rules: [
{
test: /\.css$/i,
use: ['style-loader', 'css-loader'],
},
{
test: /\.ejs$/i,
use: ['html-loader', 'template-ejs-loader'],
},
],
},
};