Skip to content

Commit d47595f

Browse files
committed
Clean up after review
1 parent c367e2e commit d47595f

4 files changed

Lines changed: 6 additions & 4 deletions

File tree

package-lock.json

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/code-studio/src/main/AppMainContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -917,7 +917,7 @@ export class AppMainContainer extends Component<
917917
notebooksUrl={
918918
new URL(
919919
`${import.meta.env.VITE_ROUTE_NOTEBOOKS}`,
920-
`${document.baseURI}`
920+
document.baseURI
921921
).href
922922
}
923923
/>

packages/code-studio/src/main/AppRouter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
} from 'react-router-dom';
88
import AppInit from './AppInit';
99

10-
const basename = new URL(document.baseURI).pathname;
10+
const basename = document.location.pathname;
1111
function AppRouter(): ReactElement {
1212
return (
1313
<Router basename={basename}>

packages/code-studio/vite.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default defineConfig(({ mode }) => {
3232
const proxy = {
3333
// Proxy styleguide here instead of as a route in our app router
3434
// That way, it is not included in the production build
35-
'^/styleguide': {
35+
'/styleguide': {
3636
target: new URL(`src/styleguide/index.html`, baseURL).toString(),
3737
rewrite: () => '',
3838
},
@@ -56,7 +56,7 @@ export default defineConfig(({ mode }) => {
5656
// It is possible to add one with a custom middleware though if this list grows
5757
[env.VITE_CORE_API_URL, env.VITE_MODULE_PLUGINS_URL].forEach(p => {
5858
const route = new URL(p, baseURL).pathname;
59-
proxy[`^${route}`] = {
59+
proxy[route] = {
6060
target: env.VITE_PROXY_URL,
6161
changeOrigin: true,
6262
};

0 commit comments

Comments
 (0)