I’ve got an issue, fully documented at:
which is causing me some issues. While the repository maintainer responds, I thought I’d also check here to see if anyone else has had a similar issue, and what their response was.
I’m using dotnet new aurelia
to create a project, integrating aurelia-config
, and adding the copy-webpack-plugin
to transfer the \config\config.json
file to the root of the web output.
In boot.ts, the following lines will not find any configuration data:
let localConfig = aurelia.container.get(AureliaConfiguration);
aurelia.container.registerInstance(VerifyClient, new VerifyClient(localConfig.get('baseUrl')));
VerifyClient
is an NSwag Swagger-generated Type Script client that takes a URL as the base-url of the service; essentially irrelevant to this topic, but I’m setting up Dependency Injection for the service handler.
When I breakpoint after the let localConfig = aurelia.container.get(AureliaConfiguration
line, I can see that localConfig
is an AureliaConfiguration object, but it doesn’t contain any data. localConfig.getAll()
returns {}
. This is different to if I @inject
or @autoinject
into a template.
What haven’t I done to use this properly?