Skip to content

Commit

Permalink
Webpack hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Jedidiah-Solomon committed May 30, 2024
1 parent 8cb6f40 commit bce2fe3
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 0 deletions.
22 changes: 22 additions & 0 deletions githup_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Add files to staging
git add .

# Prompt the user for a commit message
echo "Enter your commit message: "
read commit_msg

# Commit with the provided message
git commit -m "$commit_msg"

# Get the current branch name
current_branch=$(git branch --show-current)

# Push to the current branch
git push origin "$current_branch"

echo "Action completed sucessfully"

#chmod +x github_app.sh --to make it executable

File renamed without changes.
80 changes: 80 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");

module.exports = {
mode: "production",
entry: "./src/main.jsx",
output: {
path: path.resolve(__dirname, "dist"),
filename: "bundle.js",
publicPath: "/",
},
devServer: {
static: {
directory: path.join(__dirname, "dist"),
},
port: 5173,
open: true,
},
resolve: {
extensions: [".js", ".jsx"],
},
module: {
rules: [
{
test: /\.jsx?$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
options: {
presets: ["@babel/preset-react"],
},
},
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"],
},
{
test: /\.module\.css$/,
use: [
"style-loader",
{
loader: "css-loader",
options: {
modules: true,
},
},
],
},
{
test: /\.(png|jpe?g|gif|svg|webmanifest)$/i,
type: "asset/resource",
generator: {
filename: "img/[hash][ext][query]",
},
},
{
test: /\.(mp4)$/i,
type: "asset/resource",
generator: {
filename: "videos/[hash][ext][query]",
},
},
],
},
plugins: [
new CleanWebpackPlugin(),
new HtmlWebpackPlugin({
template: "./public/index.html",
}),
new CopyWebpackPlugin({
patterns: [
{ from: "public/favicons", to: "favicons" },
{ from: "public/img", to: "img" },
],
}),
],
};

0 comments on commit bce2fe3

Please sign in to comment.