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

fix: patch the angular browser.js to allow `{crypto: true, stream: … #2262

Merged
merged 2 commits into from
Feb 4, 2019
Merged

fix: patch the angular browser.js to allow `{crypto: true, stream: … #2262

merged 2 commits into from
Feb 4, 2019

Conversation

joshstevens19
Copy link
Contributor

@joshstevens19 joshstevens19 commented Jan 29, 2019

…true`

Description

When you install web3 on a angular app and try to build with the angular-cli it will not work without writing your own patch script. This is because we have to replace the node:false in the /angular-cli-files/models/webpack-configs/browser.js with node: {crypto: true, stream: true} to allow web3 to work with angular (as they enforce node: false which will not allow web3 to work).

Explained more in here: #2260 (comment)

I have wrote a angular-patch.js script which will run on post-install and handle all this for them. I have checked to make sure it only runs if they are installing web3 within a angular app.

Type of change

  • Bug fix
  • New feature
  • Breaking change

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no warnings.
  • I have updated or added types for all modules I've changed
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run test in the root folder with success and extended the tests if necessary.
  • I ran npm run build in the root folder and tested it in the browser and with node.
  • I ran npm run dtslint in the root folder and tested that all my types are correct
  • I have tested my code on the live network.

@joshstevens19 joshstevens19 requested a review from nivida January 29, 2019 12:46
@nivida nivida added the Enhancement Includes improvements or optimizations label Feb 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Includes improvements or optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants