Is there any way that we can reference SPFx services outside of the webpart context? For example: using the
AadHttpClient in a separate project that the webpart has as a dependency.
Currently we get a lot of errors if we do this. An example:
ERROR in ./node_modules/@microsoft/sp-http/lib/oauthTokenProvider/OAuthTokenProvider.js
 Module not found: Error: Can't resolve '@ms/sp-client-shared' in 'C:\p\mp\MatchPoint.Intranet\Client\UI.Core\node_modules\@microsoft\sp-http\lib\oauthTokenProvider'
 @ ./node_modules/@microsoft/sp-http/lib/oauthTokenProvider/OAuthTokenProvider.js 3:25-56
 @ ./node_modules/@microsoft/sp-http/lib/index.js
As far as I can tell, SPFx needs the webpart context in order to correctly solve dependency injection behind the scenes. Do you know if this is indeed the case, and if so, of any possible ways of setting that context somehow outside of the SPFx webpart?