Update build settings and homepage URL for forms app

Changed the homepage URL in package.json to a relative path and adjusted the build command's PUBLIC_URL. Also updated caniuse-lite version in package-lock.json and modified BrowserRouter basename in App.tsx.
This commit is contained in:
Teriuihi 2024-08-04 22:57:18 +02:00
parent 5301940a2f
commit 97ba9cc087
3 changed files with 9 additions and 9 deletions

12
package-lock.json generated
View File

@ -6285,9 +6285,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001574", "version": "1.0.30001647",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001647.tgz",
"integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==", "integrity": "sha512-n83xdNiyeNcHpzWY+1aFbqCK7LuLfBricc4+alSQL2Xb6OR3XpnQAmlDG+pQcdTfiHRuLcQ96VOfrPSGiNJYSg==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@ -25106,9 +25106,9 @@
} }
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001574", "version": "1.0.30001647",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001647.tgz",
"integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==" "integrity": "sha512-n83xdNiyeNcHpzWY+1aFbqCK7LuLfBricc4+alSQL2Xb6OR3XpnQAmlDG+pQcdTfiHRuLcQ96VOfrPSGiNJYSg=="
}, },
"case-sensitive-paths-webpack-plugin": { "case-sensitive-paths-webpack-plugin": {
"version": "2.4.0", "version": "2.4.0",

View File

@ -1,5 +1,5 @@
{ {
"homepage": "https://alttd.com/forms", "homepage": ".",
"name": "forms", "name": "forms",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
@ -22,7 +22,7 @@
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",
"build": "set \"PUBLIC_URL=/forms\" && react-scripts build", "build": "set \"PUBLIC_URL=/\" && react-scripts build",
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject" "eject": "react-scripts eject"
}, },

View File

@ -12,7 +12,7 @@ function App() {
return ( return (
<div className="app-container"> <div className="app-container">
<Header/> <Header/>
<BrowserRouter basename="/forms"> <BrowserRouter basename="/">
<Routes> <Routes>
<Route path="/" element={<Home/>}/> <Route path="/" element={<Home/>}/>
<Route path="/contact" element={<ContactForm/>}/> <Route path="/contact" element={<ContactForm/>}/>