Replies: 1 comment 4 replies
-
|
Hi @kaisalmen, only solution I found so far is to update the fetch function, but this is not ideal :( const originalFetch = window.fetch;
window.fetch = async (input, init) => {
if (typeof input === 'string' && input.startsWith('data:')) {
// decode inline data URIs locally (avoids CSP connect-src issue)
const [, rest] = input.split(',');
const decoded = atob(rest);
return new Response(decoded, { status: 200 });
}
return originalFetch(input, init);
};Any other solution that might work in this case? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using webpack to bundle a langium based editor very similar to the statemachine example in this repo. I am trying to define some custom themes in the extension and set the theme. Here is how I did it.
It works great in this example, it is using vite. But when I try to bundle using webpack and use it in a single page application, I encounter error
Uncaught (in promise) Error: Unable to load extension-file://my-script.my-script-editor-extension/extension/my-script-my-script-dark-theme.json: Failed to fetchI have followed instructions from this doc to bundle the workers, and it works well. But when setting the theme I get the error.
I was wondering if this is a known issue. And if there is a way to fix it or if there is a better way to use custom theme?
Here is the full console error:
Beta Was this translation helpful? Give feedback.
All reactions