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

Hidden peer dependency / process.env reference #321

Open
fochlac opened this issue Jul 10, 2024 · 1 comment
Open

Hidden peer dependency / process.env reference #321

fochlac opened this issue Jul 10, 2024 · 1 comment

Comments

@fochlac
Copy link

fochlac commented Jul 10, 2024

Hi,

I'm trying to use your library as a npm package, bundle it for the browser and I'm importing from it as follows:
import { Role, SignalingClient } from 'amazon-kinesis-video-streams-webrtc'
If I want to compile my library I now need to do two things that are not documented, I need to add the dependency 'events' and add an alias for process.env.PACKAGE_VERSION.
While this works, its not a nice DX and it would be better to ship the lib in a way that the entry point has all process.env.variables replaced and events is at least listed as peer dependency.
If this is not possible it would be good to add a note on those requirements if bundling for the browser.
See this code-sandbox and the following screenshots:
image
image

@cwoodhayes
Copy link

Thanks very much for writing this up--you saved me some time today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants