From d6be01e62a4fb9c1eb7324787e87dd0bf70eeaa6 Mon Sep 17 00:00:00 2001 From: jhk-mjolner <131662071+jhk-mjolner@users.noreply.github.com> Date: Wed, 13 Sep 2023 10:21:21 +0200 Subject: [PATCH] Update README.md: Solution for `Not allowed to load local resource` errors with Angular --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 7f97bcdc..77096c5b 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,20 @@ There are workarounds for both: } ``` +### If using Angular and getting `Not allowed to load local resource:` errors + +*The short version*: set up and use a custom webpack config file and add this under `module`: +```typescript +parser: { + javascript: { + url: true, + }, +}, +``` + +See [this issue](https://github.com/CodinGame/monaco-vscode-api/issues/186) or this [StackOverflow answer](https://stackoverflow.com/a/75252098) for more details, and [this discussion](https://github.com/angular/angular-cli/issues/24617) for more context. + + # Usage ## Monaco standalone services