File tree Expand file tree Collapse file tree 10 files changed +11
-26
lines changed Expand file tree Collapse file tree 10 files changed +11
-26
lines changed Original file line number Diff line number Diff line change 9
9
proxy_pass http://node:3000;
10
10
}
11
11
12
- location /ws {
12
+ location /admin/ ws {
13
13
proxy_pass http://node:3000;
14
14
proxy_http_version 1.1;
15
15
proxy_set_header Upgrade $http_upgrade;
Original file line number Diff line number Diff line change
1
+
1
2
# Changelog
2
3
3
4
All notable changes to this project will be documented in this file.
4
5
5
6
## [ Unreleased]
6
7
7
- - Fixed configurable base path.
8
+ - Fixed base path to /admin in vite setup .
8
9
- Changed from vite CJS to ESM.
9
10
- Removed array spread.
10
11
- Fixed HMR setup.
Original file line number Diff line number Diff line change 1
1
<!DOCTYPE html>
2
2
< html lang ="en ">
3
3
< head >
4
- < link id ="base_path " href ="/ " />
5
4
< meta charset ="utf-8 " />
6
5
< link rel ="icon " href ="/favicon.ico " />
7
6
< meta name ="viewport " content ="width=device-width, initial-scale=1 " />
Original file line number Diff line number Diff line change @@ -13,11 +13,9 @@ RUN mkdir -p ${APP_PATH} \
13
13
14
14
WORKDIR ${APP_PATH}
15
15
16
- ARG APP_BASE_PATH=/admin/
17
-
18
16
# Build it.
19
17
RUN yarn install \
20
- && BASE_PATH=${APP_BASE_PATH} yarn build
18
+ && yarn build
21
19
22
20
# Remove fixtures
23
21
RUN rm -rf public/fixtures
Original file line number Diff line number Diff line change @@ -13,11 +13,9 @@ RUN mkdir -p ${APP_PATH} \
13
13
14
14
WORKDIR ${APP_PATH}
15
15
16
- ARG APP_BASE_PATH=/admin/
17
-
18
16
# Build it.
19
17
RUN yarn install \
20
- && BASE_PATH=${APP_BASE_PATH} yarn build
18
+ && yarn build
21
19
22
20
# Remove fixtures
23
21
RUN rm -rf public/fixtures
Original file line number Diff line number Diff line change 53
53
"lint:scss:fix" : " stylelint --fix \" ./src/**/*.scss\" " ,
54
54
"check-coding-standards" : " yarn lint:js && yarn lint:scss" ,
55
55
"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 "
59
59
},
60
60
"eslintConfig" : {
61
61
"extends" : [
Original file line number Diff line number Diff line change @@ -42,7 +42,6 @@ import ActivationCodeActivate from "./components/activation-code/activation-code
42
42
import ConfigLoader from "./config-loader" ;
43
43
import "react-toastify/dist/ReactToastify.css" ;
44
44
import "./app.scss" ;
45
- import { BASE_PATH } from "./variables" ;
46
45
47
46
/**
48
47
* App component.
@@ -142,7 +141,7 @@ function App() {
142
141
} , [ ] ) ;
143
142
144
143
useEffect ( ( ) => {
145
- fetch ( ` ${ BASE_PATH } access-config.json` )
144
+ fetch ( "/admin/ access-config.json" )
146
145
. then ( ( response ) => response . json ( ) )
147
146
. then ( ( jsonData ) => {
148
147
setAccessConfig ( jsonData ) ;
Original file line number Diff line number Diff line change 1
- import { BASE_PATH } from "./variables" ;
2
-
3
1
let configData = null ;
4
2
let activePromise = null ;
5
3
@@ -13,7 +11,7 @@ const ConfigLoader = {
13
11
if ( configData !== null ) {
14
12
resolve ( configData ) ;
15
13
} else {
16
- fetch ( ` ${ BASE_PATH } config.json` )
14
+ fetch ( "/admin/ config.json" )
17
15
. then ( ( response ) => response . json ( ) )
18
16
. then ( ( data ) => {
19
17
configData = data ;
Original file line number Diff line number Diff line change @@ -4,14 +4,13 @@ import { createRoot } from "react-dom/client";
4
4
import { Provider } from "react-redux" ;
5
5
import { store } from "./redux/store" ;
6
6
import App from "./app" ;
7
- import { BASE_PATH } from "./variables" ;
8
7
9
8
const container = document . getElementById ( "root" ) ;
10
9
const root = createRoot ( container ) ;
11
10
12
11
root . render (
13
12
< Provider store = { store } >
14
- < BrowserRouter basename = { BASE_PATH } >
13
+ < BrowserRouter basename = "/admin" >
15
14
< App />
16
15
</ BrowserRouter >
17
16
</ Provider >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments