diff --git a/browser-esm-parcel/package.json b/browser-esm-parcel/package.json index 6ba45bfe..4cc26524 100644 --- a/browser-esm-parcel/package.json +++ b/browser-esm-parcel/package.json @@ -2,7 +2,7 @@ "name": "helloworld", "dependencies": {}, "scripts": { - "simpleserver": "../node_modules/.bin/yaserver --root ./dist --port 9999", + "simpleserver": "node ../node_modules/yaserver/bin/yaserver --root ./dist --port 9999", "build": "npm run build-index && npm run build-json && npm run build-css && npm run build-html && npm run build-ts && npm run build-worker", "build-index": "parcel build src/index.html", "build-json": "parcel build ../node_modules/monaco-editor/esm/vs/language/json/json.worker.js --no-source-maps", diff --git a/browser-esm-parcel/src/index.js b/browser-esm-parcel/src/index.js index d6821f2c..938b6863 100644 --- a/browser-esm-parcel/src/index.js +++ b/browser-esm-parcel/src/index.js @@ -5,10 +5,10 @@ self.MonacoEnvironment = { if (label === 'json') { return './json.worker.js'; } - if (label === 'css') { + if (label === 'css' || label === 'scss' || label === 'less') { return './css.worker.js'; } - if (label === 'html') { + if (label === 'html' || label === 'handlebars' || label === 'razor') { return './html.worker.js'; } if (label === 'typescript' || label === 'javascript') { @@ -20,5 +20,6 @@ self.MonacoEnvironment = { monaco.editor.create(document.getElementById('container'), { value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'), - language: 'javascript' + // language: 'javascript' + language: 'scss' }); diff --git a/browser-esm-webpack-small/index.js b/browser-esm-webpack-small/index.js index 80220ac7..5933ad90 100644 --- a/browser-esm-webpack-small/index.js +++ b/browser-esm-webpack-small/index.js @@ -133,10 +133,10 @@ self.MonacoEnvironment = { // if (label === 'json') { // return './json.worker.bundle.js'; // } - // if (label === 'css') { + // if (label === 'css' || label === 'scss' || label === 'less') { // return './css.worker.bundle.js'; // } - // if (label === 'html') { + // if (label === 'html' || label === 'handlebars' || label === 'razor') { // return './html.worker.bundle.js'; // } // if (label === 'typescript' || label === 'javascript') { diff --git a/browser-esm-webpack-typescript-react/src/components/Editor.tsx b/browser-esm-webpack-typescript-react/src/components/Editor.tsx index 0a89bda3..63ac6fee 100644 --- a/browser-esm-webpack-typescript-react/src/components/Editor.tsx +++ b/browser-esm-webpack-typescript-react/src/components/Editor.tsx @@ -7,10 +7,10 @@ self.MonacoEnvironment = { if (label === 'json') { return './json.worker.bundle.js'; } - if (label === 'css') { + if (label === 'css' || label === 'scss' || label === 'less') { return './css.worker.bundle.js'; } - if (label === 'html') { + if (label === 'html' || label === 'handlebars' || label === 'razor') { return './html.worker.bundle.js'; } if (label === 'typescript' || label === 'javascript') { diff --git a/browser-esm-webpack-typescript/src/index.ts b/browser-esm-webpack-typescript/src/index.ts index 7be3e7c8..ca24ca81 100644 --- a/browser-esm-webpack-typescript/src/index.ts +++ b/browser-esm-webpack-typescript/src/index.ts @@ -7,10 +7,10 @@ self.MonacoEnvironment = { if (label === 'json') { return './json.worker.bundle.js'; } - if (label === 'css') { + if (label === 'css' || label === 'scss' || label === 'less') { return './css.worker.bundle.js'; } - if (label === 'html') { + if (label === 'html' || label === 'handlebars' || label === 'razor') { return './html.worker.bundle.js'; } if (label === 'typescript' || label === 'javascript') { diff --git a/browser-esm-webpack/index.js b/browser-esm-webpack/index.js index 2569d42e..8b444a2b 100644 --- a/browser-esm-webpack/index.js +++ b/browser-esm-webpack/index.js @@ -5,10 +5,10 @@ self.MonacoEnvironment = { if (label === 'json') { return './json.worker.bundle.js'; } - if (label === 'css') { + if (label === 'css' || label === 'scss' || label === 'less') { return './css.worker.bundle.js'; } - if (label === 'html') { + if (label === 'html' || label === 'handlebars' || label === 'razor') { return './html.worker.bundle.js'; } if (label === 'typescript' || label === 'javascript') {