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

How to integrate ES6 library without compiling the source? #642

Open
Punji opened this issue Sep 6, 2018 · 0 comments
Open

How to integrate ES6 library without compiling the source? #642

Punji opened this issue Sep 6, 2018 · 0 comments

Comments

@Punji
Copy link

Punji commented Sep 6, 2018

I have a React application based on create-react-app which already uses OpenLayers (ol project v5.2.0). Now I need to integrate Cesium into it. I don't want to eject my application, so the webpack configuration is not accessible to me. In other words, I can't compile the ol-cesium ES6 library source as part of my project.

I tried to import ol-cesium v.2.2.2 from "dist/olcesium.js" but I got an error:
-> ReferenceError: ol is not defined.

Is there any way to integrate Cesium into my project? Why ol-cesium project does not have a proper distribution like many other npm modules?

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

1 participant