Files
iron-requiem/webpack.config.js
Kaysser Kayyali fc2b77ae9e
Some checks failed
Iron Requiem CI/CD / test (push) Failing after 41s
Iron Requiem CI/CD / deploy (push) Has been skipped
Build & Deploy / build-and-deploy (push) Has been cancelled
fix: update images, and tank logic
2026-05-24 03:05:49 -04:00

49 lines
1.0 KiB
JavaScript

const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
// 1. Require the plugin
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
entry: './src/main.js',
output: {
filename: 'bundle.[contenthash].js',
path: path.resolve(__dirname, 'dist'),
clean: true,
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
},
},
],
},
plugins: [
new HtmlWebpackPlugin({
template: 'index.html',
}),
// 2. Add the plugin with configuration patterns
new CopyWebpackPlugin({
patterns: [
{
from: 'assets', // Source directory of your assets
to: 'assets' // Target folder inside 'dist'
},
],
}),
],
devServer: {
static: path.resolve(__dirname, 'dist'),
port: 8080,
hot: true,
},
};