mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 17:02:27 +08:00
Grafana-UI: Switch CodeEditor to UMD @monao-editor/react (#33204)
* Grafana-UI: Switch CodeEditor to @monao-editor/react * update copy script and paths * hide context menu * use __grafana_public_path__ * Fix value and language not updating * update jaeger tsconfig * update tsconfig Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
|
||||
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
const getBabelConfig = require('./babel.config');
|
||||
|
||||
class CopyUniconsPlugin {
|
||||
@ -75,51 +75,23 @@ module.exports = {
|
||||
},
|
||||
plugins: [
|
||||
new CopyUniconsPlugin(),
|
||||
new MonacoWebpackPlugin({
|
||||
// available options are documented at https://github.com/Microsoft/monaco-editor-webpack-plugin#options
|
||||
filename: 'monaco-[name].worker.js',
|
||||
languages: ['json', 'markdown', 'html', 'sql', 'mysql', 'pgsql', 'javascript'],
|
||||
features: [
|
||||
'!accessibilityHelp',
|
||||
'bracketMatching',
|
||||
'caretOperations',
|
||||
'!clipboard',
|
||||
'!codeAction',
|
||||
'!codelens',
|
||||
'!colorDetector',
|
||||
'!comment',
|
||||
'!contextmenu',
|
||||
'!coreCommands',
|
||||
'!cursorUndo',
|
||||
'!dnd',
|
||||
'!find',
|
||||
'folding',
|
||||
'!fontZoom',
|
||||
'!format',
|
||||
'!gotoError',
|
||||
'!gotoLine',
|
||||
'!gotoSymbol',
|
||||
'!hover',
|
||||
'!iPadShowKeyboard',
|
||||
'!inPlaceReplace',
|
||||
'!inspectTokens',
|
||||
'!linesOperations',
|
||||
'!links',
|
||||
'!multicursor',
|
||||
'parameterHints',
|
||||
'!quickCommand',
|
||||
'!quickOutline',
|
||||
'!referenceSearch',
|
||||
'!rename',
|
||||
'!smartSelect',
|
||||
'!snippets',
|
||||
'suggest',
|
||||
'!toggleHighContrast',
|
||||
'!toggleTabFocusMode',
|
||||
'!transpose',
|
||||
'!wordHighlighter',
|
||||
'!wordOperations',
|
||||
'!wordPartOperations',
|
||||
new CopyWebpackPlugin({
|
||||
patterns: [
|
||||
{
|
||||
context: path.resolve(__dirname, '../../node_modules/monaco-editor/'),
|
||||
from: 'min/vs/**',
|
||||
to: '../lib/monaco/', // inside the public/build folder
|
||||
globOptions: {
|
||||
ignore: [
|
||||
'**/language/typescript/**', // 10mb
|
||||
'**/*.map', // debug files
|
||||
],
|
||||
},
|
||||
},
|
||||
// {
|
||||
// from: './node_modules/@kusto/monaco-kusto/release/min/',
|
||||
// to: 'monaco/min/vs/language/kusto/',
|
||||
// },
|
||||
],
|
||||
}),
|
||||
],
|
||||
|
Reference in New Issue
Block a user