mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +01:00
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.
34 lines
1 KiB
TypeScript
34 lines
1 KiB
TypeScript
import { Plugin } from 'webpack'
|
|
|
|
interface IMonacoEditorWebpackPluginOpts {
|
|
/**
|
|
* custom output path for worker scripts, relative to the main webpack `output.path`.
|
|
* Defaults to ''.
|
|
*/
|
|
output?: string;
|
|
|
|
/**
|
|
* Include only a subset of the languages supported.
|
|
*/
|
|
languages?: string[];
|
|
|
|
/**
|
|
* Include only a subset of the editor features.
|
|
* Use e.g. '!contextmenu' to exclude a certain feature.
|
|
*/
|
|
features?: 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.
|
|
*/
|
|
publicPath?: string;
|
|
}
|
|
|
|
declare class MonacoEditorWebpackPlugin extends Plugin {
|
|
constructor(opts?: IMonacoEditorWebpackPluginOpts)
|
|
}
|
|
|
|
export = MonacoEditorWebpackPlugin
|