mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 22:02:55 +01:00
Fix handlebars language loader
Handlebars shares a worker with html in the same way that javascript/typescript and css/less/scss share workers. However, the handlebars/html association was missing from the createLoaderRules function. This was causing a bad network request when the language was set to handlebars in the monaco-editor due to trying to load an undefined web worker. This change associates the handlebars and html workerPaths to prevent these issues.
This commit is contained in:
parent
8a99e801dd
commit
66254d1e60
1 changed files with 5 additions and 0 deletions
5
index.js
5
index.js
|
|
@ -83,6 +83,11 @@ function createLoaderRules(languages, features, workers, outputPath, publicPath)
|
|||
workerPaths['scss'] = workerPaths['css'];
|
||||
}
|
||||
|
||||
if (workerPaths['html']) {
|
||||
// handlebars and html share the same worker
|
||||
workerPaths['handlebars'] = workerPaths['html'];
|
||||
}
|
||||
|
||||
const globals = {
|
||||
'MonacoEnvironment': `(function (paths) {
|
||||
function stripTrailingSlash(str) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue