You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Brackets has a long running (minor) issue #1087, where the global RequireJS path configuration is not being re-used but instead repeated in ExtensionLoader.js.
This PR fixes the issue by creating a simple wrapper API around the semi-private (see James Burkes comment here) requirejs.s.contexts._.config and later converts them to absolute paths in ExtensionLoader.js.
This same method can also be used to retrieve global modules with other modules that aren't run in the same scope as the rest of Brackets, such as WebWorkers and Node instances. For more information see my comment at: #12006 (comment)
@ficristo It's the only way if you want to use the same configuration over different domains (for example extensions, web workers and node domains): it's a limitation of RequireJS. The semi-private API part I agree with, but then again it hasn't changed in over 5 years: if it does, there will be a similar public API available I am sure. If not, you can always just reduplicate the configuration.
It isn't a very meaningful change as of now: everything will work as they used to. It's a blocker for something similar to #12006 (my npm concept) though and overall a low hanging fruit that falls under "nice to have".
I tryed with a custom build installer on Linux (Ubuntu) and the TODO extension worked.
It works on Windows 10 too (I didn't try the installer here).
LGTM, thank you.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brackets has a long running (minor) issue #1087, where the global RequireJS path configuration is not being re-used but instead repeated in
ExtensionLoader.js
.This PR fixes the issue by creating a simple wrapper API around the semi-private (see James Burkes comment here)
requirejs.s.contexts._.config
and later converts them to absolute paths inExtensionLoader.js
.This same method can also be used to retrieve global modules with other modules that aren't run in the same scope as the rest of Brackets, such as WebWorkers and Node instances. For more information see my comment at: #12006 (comment)