Skip to content

No matching export in "@app-config/esbuild:@app-config/main" for import "loadConfig" #208

Open
@danielsitnik

Description

@danielsitnik

UPDATE (but please see next comment!)
Ok, I realize my mistake now. 😳

I just understood that by default the esbuild plugin will bundle (inline) the configuration files and there's no need to use loadConfig anymore. My initial impression was that the plugin was needed to provide some compatibility with esbuild and solve some bundling problem (like the one I mention on the next comment).

This should be more clear in the docs. I only realized it because I was going through the esbuild plugin source code and I found it has an undocumented options object where noBundledConfig = false.

Hello.

I'm trying to use the esbuild plugin, but I'm getting the following error during build:
Screen Shot 2022-08-10 at 18 58 45

I obviously need to call loadConfig somewhere in my application to load the config files.

Changing to import loadConfig from '@app-config/main'; (without brackets) won't throw a build error, but the code obviously won't work, as it now thinks that loadConfig is the same as config (ExportedConfig), which is not a function!
Screen Shot 2022-08-10 at 19 03 40

Please, what am I missing here?
Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions