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

Add an OpenLayers version selector to benchmarks #106

Merged
merged 3 commits into from
Jan 6, 2025

Conversation

jahow
Copy link
Contributor

@jahow jahow commented Jan 3, 2025

When a version other than the default one is selected, OL modules are loaded from unpkg using an import map written at runtime.

This requires Vite to bundle the app as ES modules instead of a single bundle, so that we can redirect some modules to unpkg if needed

image

To do:

  • fix build mode (only works in dev mode now)
  • show error if OL is not loaded correctly

@jahow jahow force-pushed the ol-version-selector branch 3 times, most recently from 3b2f375 to e57bb6f Compare January 3, 2025 18:09
jahow added 3 commits January 5, 2025 16:06
The OL modules can be loaded from unpkg if a version other than the one
in package.json is specified

Also added an option in the benchmarks to select another OL version (only
versions above 9.0 are supported)
@jahow jahow force-pushed the ol-version-selector branch from e57bb6f to 5050aaa Compare January 5, 2025 15:10
@jahow
Copy link
Contributor Author

jahow commented Jan 5, 2025

This is ready for review! @ronitjadhav

Copy link
Contributor

@ronitjadhav ronitjadhav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! Everything looks great and works as expected.

@jahow jahow merged commit a10693b into openlayers:main Jan 6, 2025
2 checks passed
@jahow jahow deleted the ol-version-selector branch January 6, 2025 09:00
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

Successfully merging this pull request may close these issues.

2 participants