makerdao/dai.js

Cannot use with Angular, but can with Vue

Opened this issue · 0 comments

It's odd - when I

import Maker from "@makerdao/dai"

in Vue, everything works fine in the browser. When I do so with Angular 11, I get a whole host of unresolved module errors. The list includes crypto, os, stream, and so forth.

Error: ./node_modules/web3-eth-accounts/src/index.js
Module not found: Error: Can't resolve 'crypto' in . . . 

Is the dai.js module not packaged in a way that Angular's compiler can read it?