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

[Bug] simpleWorker.nls.js fails to load if vs path does not end in 'vs' #4495

Open
2 tasks done
timconner opened this issue May 4, 2024 · 1 comment
Open
2 tasks done

Comments

@timconner
Copy link

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

No response

Monaco Editor Playground Code

No response

Reproduction Steps

This configuration will fail to load simpleWorker.nls.js:

<script>
	var require = { paths: { vs: 'https://localhost:5001/monaco' } };
</script>
<script src="https://localhost:5001/monaco/loader.js"></script>
<script src="https://localhost:5001/monaco/editor/editor.main.nls.js"></script>
<script src="https://localhost:5001/monaco/editor/editor.main.js"></script>

This code fails to load simpleWorker.nls.js as it tries to load from:
https://localhost:5001/vs/base/common/worker/simpleWorker.nls.js
Note the exclusion of the monaco directory and addition of vs.


However, if the path ends with vs, the simpleWorker loads correctly as shown below:

<script>
	var require = { paths: { vs: 'https://localhost:5001/monaco/vs' } };
</script>
<script src="https://localhost:5001/monaco/vs/loader.js"></script>
<script src="https://localhost:5001/monaco/vs/editor/editor.main.nls.js"></script>
<script src="https://localhost:5001/monaco/vs/editor/editor.main.js"></script>

This will load the file from:
https://localhost:5001/monaco/vs/base/common/worker/simpleWorker.nls.js

Actual (Problematic) Behavior

No response

Expected Behavior

No response

Additional Context

No response

@salemvi
Copy link

salemvi commented May 16, 2024

The problem is relevant, I also encountered it during the substitution of loader.config on s3, since there are problems with cdn on the lib side
The only thing that helped was to specify the vs folder in the path

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants