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.
pull/2748/head
Chris Dakin 2018-09-18 11:31:26 -05:00
parent 8a99e801dd
commit 66254d1e60
1 changed files with 5 additions and 0 deletions

View File

@ -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) {