Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix worker paths in parcel #1339

Merged
merged 1 commit into from
Mar 4, 2019
Merged

Conversation

cancerberoSgx
Copy link
Contributor

I just tried this instructions and I found this small detail for they to work perfectly

I just tried this instructions and I found this small detail for they to work perfectly
@jbsulli
Copy link
Contributor

jbsulli commented Mar 2, 2019

Interesting. I'm using a Windows machine so the shell script wasn't an option. I used the following with Parcel and the script isn't needed:

self.MonacoEnvironment = {
  getWorker(_moduleId: string, label: string) {
    switch (label) {
      case "json":
        return new Worker("../node_modules/monaco-editor/esm/vs/language/json/json.worker.js");
      case "css":
        return new Worker("../node_modules/monaco-editor/esm/vs/language/css/css.worker.js");
      case "html":
        return new Worker("../node_modules/monaco-editor/esm/vs/language/html/html.worker.js");
      case "typescript":
      case "javascript":
        return new Worker("../node_modules/monaco-editor/esm/vs/language/typescript/ts.worker.js");
      default:
        return new Worker("../node_modules/monaco-editor/esm/vs/editor/editor.worker.js");
    }
  }
};

@alexdima alexdima added this to the February 2019 milestone Mar 4, 2019
@alexdima
Copy link
Member

alexdima commented Mar 4, 2019

👍 Thank you!

@alexdima alexdima self-assigned this Mar 4, 2019
@alexdima alexdima merged commit d064a46 into microsoft:master Mar 4, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants