mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
Small tweaks
This commit is contained in:
parent
577cfae1cf
commit
2a73aeb3a6
1 changed files with 3 additions and 2 deletions
|
|
@ -76,7 +76,7 @@ interface IMonacoEditorWebpackPluginOpts {
|
||||||
languages?: EditorLanguage[];
|
languages?: EditorLanguage[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* customer languages which feature definition
|
* Custom languages (outside of the ones shipped with the `monaco-editor`).
|
||||||
*/
|
*/
|
||||||
customLanguages?: IFeatureDefinition[];
|
customLanguages?: IFeatureDefinition[];
|
||||||
|
|
||||||
|
|
@ -114,9 +114,10 @@ class MonacoEditorWebpackPlugin implements webpack.Plugin {
|
||||||
|
|
||||||
constructor(options: IMonacoEditorWebpackPluginOpts = {}) {
|
constructor(options: IMonacoEditorWebpackPluginOpts = {}) {
|
||||||
const languages = options.languages || Object.keys(languagesById);
|
const languages = options.languages || Object.keys(languagesById);
|
||||||
|
const customLanguages = options.customLanguages || [];
|
||||||
const features = getFeaturesIds(options.features || []);
|
const features = getFeaturesIds(options.features || []);
|
||||||
this.options = {
|
this.options = {
|
||||||
languages: coalesce(languages.map(id => languagesById[id])).concat(options.customLanguages || []),
|
languages: coalesce(languages.map(id => languagesById[id])).concat(customLanguages),
|
||||||
features: coalesce(features.map(id => featuresById[id])),
|
features: coalesce(features.map(id => featuresById[id])),
|
||||||
filename: options.filename || "[name].worker.js",
|
filename: options.filename || "[name].worker.js",
|
||||||
publicPath: options.publicPath || '',
|
publicPath: options.publicPath || '',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue