File tree Expand file tree Collapse file tree 5 files changed +30
-11
lines changed
Expand file tree Collapse file tree 5 files changed +30
-11
lines changed Original file line number Diff line number Diff line change 33 "version" : " 0.1.0" ,
44 "private" : true ,
55 "type" : " module" ,
6+ "scripts" : {
7+ "start" : " vite" ,
8+ "build" : " tsc -b && vite build" ,
9+ "preview" : " vite preview" ,
10+ "lint" : " eslint . --report-unused-disable-directives --max-warnings 0" ,
11+ "test" : " vitest"
12+ },
613 "dependencies" : {
714 "@igniteui/material-icons-extended" : " ^3.0.0" ,
815 "@testing-library/jest-dom" : " ^6.1.3" ,
3542 "vite" : " ^4.4.9" ,
3643 "vitest-canvas-mock" : " ^0.3.3"
3744 },
38- "scripts" : {
39- "start" : " vite" ,
40- "build" : " tsc && node --max-old-space-size=4096 node_modules/vite/bin/vite build" ,
41- "preview" : " vite preview" ,
42- "lint" : " eslint . --report-unused-disable-directives --max-warnings 0" ,
43- "test" : " vitest"
44- },
4545 "browserslist" : [
4646 " >0.2%" ,
4747 " not dead" ,
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" ?>
2+ <configuration >
3+ <system .webServer>
4+ <rewrite >
5+ <rules >
6+ <rule name =" React Routes" stopProcessing =" true" >
7+ <match url =" .*" />
8+ <conditions logicalGrouping =" MatchAll" >
9+ <add input =" {REQUEST_FILENAME}" matchType =" IsFile" negate =" true" />
10+ <add input =" {REQUEST_FILENAME}" matchType =" IsDirectory" negate =" true" />
11+ <add input =" {REQUEST_URI}" pattern =" ^/(api)" negate =" true" />
12+ </conditions >
13+ <action type =" Rewrite" url =" /react-grid-examples/" />
14+ </rule >
15+ </rules >
16+ </rewrite >
17+ </system .webServer>
18+ </configuration >
Original file line number Diff line number Diff line change @@ -115,14 +115,14 @@ export default function HomeView() {
115115 ] ,
116116 ] ) ;
117117 const location = useLocation ( ) ;
118- const [ gridView , setGridView ] = useState ( "/ inventory" )
118+ const [ gridView , setGridView ] = useState ( "inventory" ) ;
119119
120120 useEffect ( ( ) => {
121121 registerIcon ( "file_download" , FILE_DOWNLOAD , "custom" ) ;
122122 } , [ ] ) ;
123123
124124 useEffect ( ( ) => {
125- setGridView ( location . pathname . replace ( "/home" , "" ) ) ;
125+ setGridView ( location . pathname . replace ( "/home/ " , "" ) ) ;
126126 } , [ location ] ) ;
127127
128128 return (
@@ -137,7 +137,7 @@ export default function HomeView() {
137137 ) }
138138 </ div >
139139 < div className = "router-container" >
140- < iframe src = { gridView } height = '100%' width = '100%' style = { { border : 0 } } />
140+ < iframe src = { import . meta . env . BASE_URL + gridView } height = '100%' width = '100%' style = { { border : 0 } } />
141141 </ div >
142142 </ div >
143143 ) ;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import App from './app/app';
55import { routes } from "./app/app-routes" ;
66import 'react-app-polyfill/ie11' ;
77
8- const basename = import . meta. env . VITE_BASENAME || '/' ;
8+ const basename = import . meta. env . BASE_URL || '/' ;
99
1010/** Required in IE11 for Charts */
1111Number . isNaN = Number . isNaN || function ( value ) {
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import react from '@vitejs/plugin-react'
44
55// https://vitejs.dev/config/
66export default defineConfig ( {
7+ base : '/react-grid-examples/' ,
78 build : {
89 chunkSizeWarningLimit : 10 * 1024 * 1024 , // 10 MB
910 } ,
You can’t perform that action at this time.
0 commit comments