I'm having issues bundling dependencies.
My library package is a wrapper around @angular/material components.
I was surprised to find that everywhere I installed my library package also asked for @angular/material to be installed or I get an error.
There has to be a better way to do this right? I would like my package to be self-contained and "include" angular/material when it is installed.
I read that adding the following to the library's package.json
"bundledDependencies": [
"@angular/material"
]
should solve this issue, but it didn't seem to work, or at least there has to be another step, because then I see this error when I am installing my package:
is missing a bundled dependency "@angular/material". This should be reported to the package maintainer.
That error really makes it sound like I'm just missing something and this will work as I'm expecting. What am I missing?
I haven't been able to find any information on that error.
We would like to force the dependency to be installed to keep our library "modular" and self contained. In other words, we just want to install our library and automatically get all the dependencies that it needs.
We do not want to rely on the warning message from a peerDependencies.
It seems like this has to be a possible pattern, can anyone explain the point of bundledDependencies