Description
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:
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 thatloadConfig
is the same asconfig
(ExportedConfig), which is not a function!
Please, what am I missing here?
Thank you.