Skip to content

Commit

Permalink
fix: yml branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbo-lab committed Oct 16, 2024
1 parent 9b3a725 commit d37f4d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to GitHub Pages
on:
push:
branches:
- main
- master

jobs:
build:
Expand Down
23 changes: 5 additions & 18 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");

module.exports = {
entry: "./src/index.js", // Your entry file
entry: "./src/index.js",
output: {
filename: "bundle.js",
path: path.resolve(__dirname, "dist"), // Ensure 'dist/' is the output folder
clean: true, // Automatically clean old files from dist/
path: path.resolve(__dirname, "dist"),
},
module: {
rules: [
Expand All @@ -26,25 +24,14 @@ module.exports = {
},
plugins: [
new HtmlWebpackPlugin({
template: "./public/index.html", // HTML template from public folder
}),
new CopyWebpackPlugin({
patterns: [
{
from: path.resolve(__dirname, "public"), // Ensure absolute path is used
to: ".", // Copy to the root of dist/
globOptions: {
ignore: ["**/index.html"], // Avoid copying the template twice
},
},
],
template: "./public/index.html",
}),
],
devServer: {
static: {
directory: path.join(__dirname, "dist"), // Serve from 'dist/'
directory: path.join(__dirname, "dist"),
},
compress: true,
port: 3000, // Development server on port 3000
port: 3000,
},
};

0 comments on commit d37f4d8

Please sign in to comment.