-
Notifications
You must be signed in to change notification settings - Fork 466
@0x/subproviders Doesn't Work With Angular 6 When Doing Production Builds For Client or Server #1195
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
We're going to look into tree shaking better for the subproviders package. At the very least we should split out ganache-core (used in testing) from the rest of the subproviders. Also had a bit of luck following this comment here, trufflesuite/ganache#204 (comment).
in node_modules/scrypt/index.js.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because no activity occured in 7 days after being marked as stale. If it's still relevant - feel free to reopen. Thank you for your contributions. |
Here is a simple repo, taken from the Angular Universal Starter: https://github.com/pointtoken/universal-starter/tree/0x
You'll see I added the 0x SubProviders library and try to instantiate it. I also had to deal with Angular not liking crypto with this hack
https://gist.github.com/niespodd/1fa82da6f8c901d1c33d2fcbb762947d
Which I learned about from here:
web3/web3.js#1555
If I create a production build and just try to serve the browser files, it fails at runtime.
If I try to create a build that runs on the server (which runs a different webpack that targets node), it won't even build:
It seems like there is a lot of code in the subprovider library that isn't being shaken out -- could this library be made more modular? Or are there webpack tricks/hacks that need to be in place?
The text was updated successfully, but these errors were encountered: