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

Failed to import proj4 correctly #754

Closed
arbakker opened this issue Oct 31, 2023 · 3 comments
Closed

Failed to import proj4 correctly #754

arbakker opened this issue Oct 31, 2023 · 3 comments
Assignees
Labels
browser Not working in Browser bug Something isn't working

Comments

@arbakker
Copy link

Failing module

Imported module does not work as intended, see also openlayers/openlayers#15274 on OpenLayers issue tracker.

The issue lies in the interaction between the ol and proj4 packages. ol uses coordinate reference system (CRS) definitions that have been defined in proj4. But using esm.sh ol fails to use the CRS definitions defined in proj4.

Error message

Coordinates reprojected through openlayers interface are not reprojected correct:

image

It should look like this:

image

Using Skypack CDN the failing-esm-example does actually work.

Additional info

  • esm.sh version: current prod
  • Browser version: firefox 118.0.2 (64-bit)
@arbakker arbakker added the browser Not working in Browser label Oct 31, 2023
@ije
Copy link
Member

ije commented Nov 16, 2023

@arbakker thanks for the details hug help! i just dig a bit, this happens because esm.sh bundle code by default for reducing network requests that breaks the slideEffect(skypack works since its running in non bundling mode)

@ije ije added the bug Something isn't working label Nov 16, 2023
@ije ije self-assigned this Nov 16, 2023
@ije ije closed this as completed in 58a81f4 Nov 16, 2023
@ije
Copy link
Member

ije commented Nov 16, 2023

i just added a patch to fix this, the testing https://github.com/esm-dev/esm.sh/blob/main/test/issue-754/issue-754.test.ts is passed. should work in next build version(will update asap).

@arbakker
Copy link
Author

Forgot about this, I just checked and works as expected now. Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
browser Not working in Browser bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants