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

Conversation

@aphelionz
Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Member

shamb0t commented Sep 2, 2019

Ah got it for other projects to compile using webpack

@aphelionz aphelionz force-pushed the fix/webpack branch from fb7f923 to 6ab1640 Sep 2, 2019
fs-shim
@aphelionz aphelionz force-pushed the fix/webpack branch from f4dd01f to a74c3f9 Sep 3, 2019
@aphelionz aphelionz merged commit cdc4fc3 into master Sep 3, 2019
1 check passed
1 check passed
ci/circleci Your tests passed on CircleCI!
Details
@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
Projects
None yet
2 participants
You can’t perform that action at this time.