Skip to content

Commit

Permalink
Merge pull request #6215 from savindi7/revert-monaco-hotifx
Browse files Browse the repository at this point in the history
Revert commit - use Monaco as an npm package
  • Loading branch information
DonOmalVindula authored May 8, 2024
2 parents 323916d + 11bc934 commit eedabb6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 39 deletions.
2 changes: 0 additions & 2 deletions apps/console/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@
"js-beautify": "^1.13.0",
"lodash-es": "^4.17.21",
"moment": "^2.24.0",
"monaco-editor": "^0.48.0",
"monaco-editor-webpack-plugin": "^7.1.0",
"mustache": "^4.2.0",
"node-forge": "^0.10.0",
"rc-tree": "^4.0.0-beta.2",
Expand Down
6 changes: 0 additions & 6 deletions apps/console/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

import { AuthProvider } from "@asgardeo/auth-react";
import { loader } from "@monaco-editor/react";
import { ThemeProvider } from "@oxygen-ui/react/theme";
import { ContextUtils } from "@wso2is/core/utils";
import { AuthenticateUtils } from "@wso2is/features/admin.authentication.v1";
Expand All @@ -27,7 +26,6 @@ import { AppConfigProvider } from "@wso2is/features/admin.core.v1/providers/app-
import AppSettingsProvider from "@wso2is/features/admin.core.v1/providers/app-settings-provider";
import UserPreferencesProvider from "@wso2is/features/admin.core.v1/providers/user-preferences-provider";
import OrganizationsProvider from "@wso2is/features/admin.organizations.v1/providers/organizations-provider";
import * as monaco from "monaco-editor";
import React, { ReactElement, useEffect, useState } from "react";
import * as ReactDOM from "react-dom";
import { Provider } from "react-redux";
Expand All @@ -38,10 +36,6 @@ import { ProtectedApp } from "./protected-app";
// Set the runtime config in the context.
ContextUtils.setRuntimeConfig(Config.getDeploymentConfig());

// Manually load the `monaco` editor instance to use as an npm package instead of using CDN.
// This enables the usage of the editor instance in offline mode.
loader.config({ monaco });

/**
* Render root component with configs.
*
Expand Down
5 changes: 0 additions & 5 deletions apps/console/webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import CopyWebpackPlugin from "copy-webpack-plugin";
import ESLintPlugin from "eslint-webpack-plugin";
import HtmlWebpackPlugin from "html-webpack-plugin";
import JsonMinimizerPlugin from "json-minimizer-webpack-plugin";
import MonacoWebpackPlugin from "monaco-editor-webpack-plugin";
import webpack, {
Configuration,
RuleSetRule,
Expand Down Expand Up @@ -389,10 +388,6 @@ module.exports = (config: WebpackOptionsNormalized, context: NxWebpackContextInt
}) as unknown as WebpackPluginInstance
);

config.plugins.push(
new MonacoWebpackPlugin() as unknown as WebpackPluginInstance
);

// Ignore all the locale files in moment.
// Required locale files will be explicitly imported in the app.
config.plugins.push(
Expand Down
35 changes: 9 additions & 26 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 eedabb6

Please sign in to comment.