Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Making js-ipfs supports webpack5 #3511

Closed
FledgeXu opened this issue Jan 27, 2021 · 3 comments · Fixed by #3512
Closed

Making js-ipfs supports webpack5 #3511

FledgeXu opened this issue Jan 27, 2021 · 3 comments · Fixed by #3512
Labels
kind/support A question or request for support

Comments

@FledgeXu
Copy link

FledgeXu commented Jan 27, 2021

  • Version:
    "ipfs": "0.53.2",
  • Platform:
    Darwin FledgeXus-MBP 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec 2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASE_X86_64 x86_64

Severity:

Hight: Making JS-ipfs supports webpack5

Description:

Webpack5 removes Node.js core modules polyfills and it makes that js-ipfs can not just work in browser. How will the IPFS support webpack5?

@FledgeXu FledgeXu added the need/triage Needs initial labeling and prioritization label Jan 27, 2021
@welcome
Copy link

welcome bot commented Jan 27, 2021

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@achingbrain achingbrain added kind/support A question or request for support and removed need/triage Needs initial labeling and prioritization labels Jan 27, 2021
@achingbrain
Copy link
Member

We've removed node globals from all the repos in the ipfs/ipld/multiformats orgs. There are still a few dependencies of IPFS that do things like reference process or Buffer without requireing them first, those will take longer to fix.

If you would like to help you can PR those repos to remove the use of node globals. I did cbor earlier today. I think some of the level repos need PRs, as does node-forge and some of the crypto libraries.

Otherwise the only solution is to stick to webpack 4 for now, or use a different bundler.

@Gozala
Copy link
Contributor

Gozala commented Jan 28, 2021

We actually have one example that uses webpack5,
https://github.com/ipfs/js-ipfs/blob/master/examples/browser-service-worker/webpack.config.js

achingbrain added a commit that referenced this issue Jan 28, 2021
Takes the config from the service worker example and uses it to
patch up the webpack example to use v5

fixes: #3511
achingbrain added a commit that referenced this issue Jan 29, 2021
Takes the config from the service worker example and uses it to patch up the webpack example to use v5

fixes: #3511
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/support A question or request for support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants