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

Ensure webpack compiles in downstream projects #675

Merged
merged 1 commit into from Sep 3, 2019
Merged

Ensure webpack compiles in downstream projects #675

merged 1 commit into from Sep 3, 2019

Conversation

aphelionz
Copy link
Member

@aphelionz aphelionz commented Sep 1, 2019

This PR removes leveldown as a direct dependency, instead relying on the implementation of level in orbit-db-storage-adapter, which in turn handles browser vs node dependency switching.

In addition, it utilizes a neat trick that uses eval to require the fs module, ensuring webpack compilation while still allowing node to use fs

@aphelionz aphelionz changed the title leveldown removed Ensure webpack compiles in downstream projects Sep 2, 2019
@aphelionz aphelionz mentioned this pull request Sep 2, 2019
@shamb0t
Copy link
Member

@shamb0t shamb0t commented Sep 2, 2019

Not sure I understand the need to use the eval trick. Shouldn't this line

allow webpack to compile?

@shamb0t
Copy link
Member

@shamb0t shamb0t commented Sep 2, 2019

Ah got it for other projects to compile using webpack

@aphelionz aphelionz merged commit cdc4fc3 into master Sep 3, 2019
1 check passed
@aphelionz aphelionz deleted the fix/webpack branch Sep 3, 2019
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.

None yet

2 participants