Skip to content

Commit

Permalink
Merge branch 'master' into fix-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
saskliutas authored Dec 18, 2024
2 parents 67266a3 + a643f39 commit 3fd5d50
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 18 deletions.
1 change: 0 additions & 1 deletion app/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
"tslib": "^2.8.1",
"typescript": "^5.7.2",
"vite": "^6.0.2",
"vite-plugin-monaco-editor": "1.1.0",
"vite-plugin-static-copy": "^2.2.0"
}
}
2 changes: 1 addition & 1 deletion app/frontend/src/app/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const AuthorizationProvider = clientId
redirect_uri: "/auth/callback",
silent_redirect_uri: "/auth/silent",
post_logout_redirect_uri: "/",
scope: "itwin-platform itwinjs openid profile",
scope: "itwin-platform openid profile",
})
: (props: React.PropsWithChildren<object>) => <>{props.children}</>;

Expand Down
13 changes: 13 additions & 0 deletions app/frontend/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,23 @@
*--------------------------------------------------------------------------------------------*/

import "./index.scss";
import editorWorker from "monaco-editor/esm/vs/editor/editor.worker?worker";
import jsonWorker from "monaco-editor/esm/vs/language/json/json.worker?worker";
import { createRoot } from "react-dom/client";
import { BrowserRouter } from "react-router-dom";
import { App } from "./app/App.js";

// setup environment for monaco editor
// loading only json and default workers as other languages are not used.
self.MonacoEnvironment = {
getWorker(_, label) {
if (label === "json") {
return new jsonWorker();
}
return new editorWorker();
},
};

const div = document.createElement("div");
div.className = "app";
document.body.appendChild(div);
Expand Down
4 changes: 0 additions & 4 deletions app/frontend/vite.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*--------------------------------------------------------------------------------------------*/

import { defineConfig, loadEnv } from "vite";
import monacoEditorPlugin from "vite-plugin-monaco-editor";
import { viteStaticCopy } from "vite-plugin-static-copy";
import react from "@vitejs/plugin-react";

Expand All @@ -24,9 +23,6 @@ export default defineConfig(({ mode }) => {
},
],
}),
monacoEditorPlugin.default({
languageWorkers: ["json"],
}),
],
server: {
port: 3000,
Expand Down
12 changes: 0 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3fd5d50

Please sign in to comment.