monaco-editor-webpack-plugin

  • Version 7.1.0
  • Published
  • 23.9 kB
  • 1 dependency
  • MIT license

Install

npm i monaco-editor-webpack-plugin
yarn add monaco-editor-webpack-plugin
pnpm add monaco-editor-webpack-plugin

Overview

A webpack plugin for the Monaco Editor

Index

Classes

class MonacoEditorWebpackPlugin

class MonacoEditorWebpackPlugin implements webpack.WebpackPluginInstance {}

    constructor

    constructor(options?: MonacoEditorWebpackPlugin.IMonacoEditorWebpackPluginOpts);

      method apply

      apply: (compiler: webpack.Compiler) => void;

        Interfaces

        interface IMonacoEditorWebpackPluginOpts

        interface IMonacoEditorWebpackPluginOpts {}

          property customLanguages

          customLanguages?: IFeatureDefinition[];
          • Custom languages (outside of the ones shipped with the monaco-editor).

          property features

          features?: (EditorFeature | NegatedEditorFeature)[];
          • Include only a subset of the editor features. Use e.g. '!contextmenu' to exclude a certain feature.

          property filename

          filename?: string;
          • Specify a filename template to use for generated files. Use e.g. '[name].worker.[contenthash].js' to include content-based hashes.

          property globalAPI

          globalAPI?: boolean;
          • Specify whether the editor API should be exposed through a global monaco object or not. This option is applicable to 0.22.0 and newer version of monaco-editor. Since 0.22.0, the ESM version of the monaco editor does no longer define a global monaco object unless global.MonacoEnvironment = { globalAPI: true } is set ([change log](https://github.com/microsoft/monaco-editor/blob/main/CHANGELOG.md#0220-29012021)).

          property languages

          languages?: EditorLanguage[];
          • Include only a subset of the languages supported.

          property monacoEditorPath

          monacoEditorPath?: string;
          • The absolute file system path to the monaco-editor npm module. Use e.g. C:\projects\my-project\node-modules\monaco-editor

          property publicPath

          publicPath?: string;
          • Override the public path from which files generated by this plugin will be served. This wins out over Webpack's dynamic runtime path and can be useful to avoid attempting to load workers cross- origin when using a CDN for other static resources. Use e.g. '/' if you want to load your resources from the current origin.

          Package Files (1)

          Dependencies (1)

          Dev Dependencies (8)

          Peer Dependencies (2)

          Badge

          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/monaco-editor-webpack-plugin.

          • Markdown
            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/monaco-editor-webpack-plugin)
          • HTML
            <a href="https://www.jsdocs.io/package/monaco-editor-webpack-plugin"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>