Skip to content

Commit

Permalink
fix baseRef broken after updating nx
Browse files Browse the repository at this point in the history
  • Loading branch information
firsttris committed Nov 28, 2023
1 parent aa0b28d commit 098ebd7
Show file tree
Hide file tree
Showing 8 changed files with 248 additions and 218 deletions.
2 changes: 1 addition & 1 deletion apps/ccu-addon-mui/.env.development
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REACT_APP_BASENAME=/
REACT_ROUTER_BASENAME=/
2 changes: 1 addition & 1 deletion apps/ccu-addon-mui/.env.production
Original file line number Diff line number Diff line change
@@ -1 +1 @@
REACT_APP_BASENAME=/addons/mui/
REACT_ROUTER_BASENAME=/addons/mui/
8 changes: 1 addition & 7 deletions apps/ccu-addon-mui/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"compiler": "babel",
"outputPath": "dist/apps/ccu-addon-mui",
"index": "apps/ccu-addon-mui/src/index.html",
"baseHref": "/",
"baseHref": "/addons/mui/",
"main": "apps/ccu-addon-mui/src/main.tsx",
"polyfills": "apps/ccu-addon-mui/src/polyfills.ts",
"tsConfig": "apps/ccu-addon-mui/tsconfig.app.json",
Expand All @@ -32,12 +32,6 @@
"vendorChunk": true
},
"production": {
"fileReplacements": [
{
"replace": "apps/ccu-addon-mui/src/environments/environment.ts",
"with": "apps/ccu-addon-mui/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
Expand Down
4 changes: 0 additions & 4 deletions apps/ccu-addon-mui/src/environments/environment.prod.ts

This file was deleted.

7 changes: 0 additions & 7 deletions apps/ccu-addon-mui/src/environments/environment.ts

This file was deleted.

5 changes: 1 addition & 4 deletions apps/ccu-addon-mui/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { StrictMode } from 'react';
import * as ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';

import { Router } from './router';

import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { environment } from './environments/environment';

const queryClient = new QueryClient({
defaultOptions: {
Expand All @@ -20,7 +17,7 @@ const root = ReactDOM.createRoot(
);
root.render(
<StrictMode>
<BrowserRouter basename={environment.basename}>
<BrowserRouter basename={process.env['REACT_APP_BASENAME']}>
<QueryClientProvider client={queryClient}>
<Router />
</QueryClientProvider>
Expand Down
Loading

0 comments on commit 098ebd7

Please sign in to comment.