[Bug] Diff demo on the project homepage doesn't work
Reproducible in vscode.dev or in VS Code Desktop?
- [x] Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- [ ] Not reproducible in the monaco editor playground
Monaco Editor Playground Link
Heats up: On the homepage the diff doesn't work
Monaco Editor Playground Code
Reproduction Steps
Just go to the page: https://microsoft.github.io/monaco-editor/ and scroll to the bottom.
Diff demo doesn't work
Actual (Problematic) Behavior
No response
Expected Behavior
No response
Additional Context
No response
worker file request failed.
Duplicate of #4807 ?
May also be related to: https://github.com/microsoft/monaco-editor/issues/4647
Seems linked to CDN-based serving of content (that is; local serving works fine, but if a site pulls monaco et al from a different domain, it fails). Even using the webpack module's publicPath support it fails. (see #4807 where I linked issues we're having) This worked in v0.49 and in prior versions, so I wonder what changed.
The code that thjrows is:
class DefaultWorkerFactory {
static { this.LAST_WORKER_ID = 0; }
constructor() {
this._webWorkerFailedBeforeError = false;
}
create(desc, onMessageCallback, onErrorCallback) {
const workerId = (++DefaultWorkerFactory.LAST_WORKER_ID);
if (this._webWorkerFailedBeforeError) {
throw this._webWorkerFailedBeforeError;
}
return new WebWorker(desc.esmModuleLocation, desc.amdModuleId, workerId, desc.label || 'anonymous' + workerId, onMessageCallback, (err) => {
logOnceWebWorkerWarning(err);
this._webWorkerFailedBeforeError = err;
onErrorCallback(err);
});
}
}
and I've tried with:
- no
publicPath-> errors as above -
publicPathset to the CDN -> errors as above -
publicPathset to/(per the docs this should fetch from the ORIGIN instead to work around problems) - nearly the same error except the error logged isundefined(thelogOnceWebWorkerWarning...) which implieserrisundefined