Skip to content

Commit cf1e09e

Browse files
committed
1859: Changed to fixed base path /admin
1 parent 2345fbe commit cf1e09e

File tree

10 files changed

+11
-26
lines changed

10 files changed

+11
-26
lines changed

.docker/vhost.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ server {
99
proxy_pass http://node:3000;
1010
}
1111

12-
location /ws {
12+
location /admin/ws {
1313
proxy_pass http://node:3000;
1414
proxy_http_version 1.1;
1515
proxy_set_header Upgrade $http_upgrade;

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1+
12
# Changelog
23

34
All notable changes to this project will be documented in this file.
45

56
## [Unreleased]
67

7-
- Fixed configurable base path.
8+
- Fixed base path to /admin in vite setup.
89
- Changed from vite CJS to ESM.
910
- Removed array spread.
1011
- Fixed HMR setup.

index.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4-
<link id="base_path" href="/" />
54
<meta charset="utf-8" />
65
<link rel="icon" href="/favicon.ico" />
76
<meta name="viewport" content="width=device-width, initial-scale=1" />

infrastructure/itkdev/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ RUN mkdir -p ${APP_PATH} \
1313

1414
WORKDIR ${APP_PATH}
1515

16-
ARG APP_BASE_PATH=/admin/
17-
1816
# Build it.
1917
RUN yarn install \
20-
&& BASE_PATH=${APP_BASE_PATH} yarn build
18+
&& yarn build
2119

2220
# Remove fixtures
2321
RUN rm -rf public/fixtures

infrastructure/os2display/Dockerfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@ RUN mkdir -p ${APP_PATH} \
1313

1414
WORKDIR ${APP_PATH}
1515

16-
ARG APP_BASE_PATH=/admin/
17-
1816
# Build it.
1917
RUN yarn install \
20-
&& BASE_PATH=${APP_BASE_PATH} yarn build
18+
&& yarn build
2119

2220
# Remove fixtures
2321
RUN rm -rf public/fixtures

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
"lint:scss:fix": "stylelint --fix \"./src/**/*.scss\"",
5454
"check-coding-standards": "yarn lint:js && yarn lint:scss",
5555
"apply-coding-standards": "yarn lint:js:fix && yarn lint:scss:fix",
56-
"start": "vite --host 0.0.0.0",
57-
"build": "vite build --base=$BASE_PATH",
58-
"preview": "vite preview"
56+
"start": "vite --host 0.0.0.0 --base=/admin",
57+
"build": "vite build --base=/admin",
58+
"preview": "vite preview --base=/admin"
5959
},
6060
"eslintConfig": {
6161
"extends": [

src/app.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ import ActivationCodeActivate from "./components/activation-code/activation-code
4242
import ConfigLoader from "./config-loader";
4343
import "react-toastify/dist/ReactToastify.css";
4444
import "./app.scss";
45-
import { BASE_PATH } from "./variables";
4645

4746
/**
4847
* App component.
@@ -142,7 +141,7 @@ function App() {
142141
}, []);
143142

144143
useEffect(() => {
145-
fetch(`${BASE_PATH}access-config.json`)
144+
fetch("/admin/access-config.json")
146145
.then((response) => response.json())
147146
.then((jsonData) => {
148147
setAccessConfig(jsonData);

src/config-loader.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { BASE_PATH } from "./variables";
2-
31
let configData = null;
42
let activePromise = null;
53

@@ -13,7 +11,7 @@ const ConfigLoader = {
1311
if (configData !== null) {
1412
resolve(configData);
1513
} else {
16-
fetch(`${BASE_PATH}config.json`)
14+
fetch("/admin/config.json")
1715
.then((response) => response.json())
1816
.then((data) => {
1917
configData = data;

src/index.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,13 @@ import { createRoot } from "react-dom/client";
44
import { Provider } from "react-redux";
55
import { store } from "./redux/store";
66
import App from "./app";
7-
import { BASE_PATH } from "./variables";
87

98
const container = document.getElementById("root");
109
const root = createRoot(container);
1110

1211
root.render(
1312
<Provider store={store}>
14-
<BrowserRouter basename={BASE_PATH}>
13+
<BrowserRouter basename="/admin">
1514
<App />
1615
</BrowserRouter>
1716
</Provider>

src/variables.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)