From 131c9ebd040736a36df6d99a57847aed2ad913f0 Mon Sep 17 00:00:00 2001 From: Vic Date: Sat, 13 Jul 2024 19:30:25 -0500 Subject: [PATCH] add webpack dev server --- client/package.json | 4 +++- client/public/index.html | 15 +++++++++++++++ client/src/components/Header/Header.jsx | 2 +- client/src/globals.css | 4 ++++ client/src/pages/Home.jsx | 15 ++++++--------- client/src/routers/root/router.js | 3 --- client/webpack-dev.config.js | 12 ++++++++++++ 7 files changed, 41 insertions(+), 14 deletions(-) create mode 100644 client/public/index.html create mode 100644 client/webpack-dev.config.js diff --git a/client/package.json b/client/package.json index 5b4e259..a7d1abb 100644 --- a/client/package.json +++ b/client/package.json @@ -7,6 +7,7 @@ "scripts": { "build": "webpack", "deploy": "wrangler deploy src/index.js", + "dev": "webpack-dev-server --config webpack-dev.config.js --open", "prepare": "husky", "start": "wrangler dev src/index.js" }, @@ -37,6 +38,7 @@ "style-loader": "^4.0.0", "tailwindcss": "^3.4.4", "webpack": "^5.93.0", - "webpack-cli": "^5.1.4" + "webpack-cli": "^5.1.4", + "webpack-dev-server": "^5.0.4" } } diff --git a/client/public/index.html b/client/public/index.html new file mode 100644 index 0000000..116164f --- /dev/null +++ b/client/public/index.html @@ -0,0 +1,15 @@ + + + + + + + React App on Cloudflare Workers + + + + +
+ + + \ No newline at end of file diff --git a/client/src/components/Header/Header.jsx b/client/src/components/Header/Header.jsx index 07d334e..aab38c2 100644 --- a/client/src/components/Header/Header.jsx +++ b/client/src/components/Header/Header.jsx @@ -1,5 +1,5 @@ export const Header = () => ( -