Resolve browser compatibility and circular import issues#167
Merged
zxwild merged 1 commit intogeoman-io:masterfrom Mar 4, 2026
Merged
Resolve browser compatibility and circular import issues#167zxwild merged 1 commit intogeoman-io:masterfrom
zxwild merged 1 commit intogeoman-io:masterfrom
Conversation
Contributor
|
Ok, thanks, it seems it required to check such imports across the project. IDE tries to auto-import everything from |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hi π
When consuming
maplibre-geomandirectly from sources (e.g. as a git submodule, without a prior build step), two runtime issues arise.Changes
constants.tsβ Guardprocessaccess in browser environmentsprocess.env.VITE_GEOMAN_VERSIONthrows aReferenceErrorin the browser sinceprocessis not defined outside of Node/Vite-shim contexts. The existingtry/catchonly handled the case where__GEOMAN_VERSION__is undefined, not whereprocessitself is absent.style.tsβ Circular dependency caused by@/main.tsimportImporting
FeatureShape,LayerStyleandSOURCESfrom@/main.ts(the package entry point) creates a circular module graph that causes an infinite loop at runtime. Each symbol is now imported directly from its source module.