How to use the monaco-editor-webpack-plugin function in monaco-editor-webpack-plugin

To help you get started, we’ve selected a few monaco-editor-webpack-plugin examples, based on popular ways it is used in public projects.

github jaywcjlove / react-monacoeditor / .kktrc.js View on Github external
export default (conf) => {
  const pkg = require(path.resolve(process.cwd(), 'package.json'));
  conf.plugins.push(new MonacoWebpackPlugin({
    // languages: ['bat', 'coffee', 'cpp', 'csharp', 'csp', 'css', 'dockerfile', 'fsharp', 'go', 'handlebars', 'html', 'ini', 'java', 'json', 'less', 'lua', 'markdown', 'msdax', 'mysql', 'objective', 'pgsql', 'php', 'postiats', 'powershell', 'pug', 'python', 'r', 'razor', 'redis', 'redshift', 'ruby', 'sb', 'scss', 'solidity', 'sql', 'swift', 'typescript', 'vb', 'xml', 'yaml'],
    // features: ['accessibilityHelp', 'bracketMatching', 'caretOperations', 'clipboard', 'codelens', 'colorDetector', 'comment', 'contextmenu', 'coreCommands', 'cursorUndo', 'dnd', 'find', 'folding', 'format', 'gotoDeclarationCommands', 'gotoDeclarationMouse', 'gotoError', 'gotoLine', 'hover', 'inPlaceReplace', 'inspectTokens', 'iPadShowKeyboard', 'linesOperations', 'links', 'multicursor', 'parameterHints', 'quickCommand', 'quickFixCommands', 'quickOutline', 'referenceSearch', 'rename', 'smartSelect', 'snippets', 'suggest', 'toggleHighContrast', 'toggleTabFocusMode', 'transpose', 'wordHighlighter', 'wordOperations'],
  }));
  // conf.resolve = conf.resolve || {};
  conf.resolve.alias = { '@uiw/react-monacoeditor': process.cwd() };

  // Loader Markdown
  conf.module.rules.map((item) => {
    if (item.oneOf) {
      item.oneOf.unshift({
        test: /\.md$/,
        use: require.resolve('raw-loader'),
      });
    }
    return item;
  });

monaco-editor-webpack-plugin

A webpack plugin for the Monaco Editor

MIT
Latest version published 10 months ago

Package Health Score

91 / 100
Full package analysis

Similar packages