Open dac09 opened 4 years ago
As an aside, I think what would be really helpful is if we could customise the webpack configuration i.e. add our own plugins, and nextron can merge the configs.
Any further insight on this? How to incorperate .env into nextron build? Do we have to use webpack (i.e., next.config.js)?
Any further insight on this? How to incorperate .env into nextron build? Do we have to use webpack (i.e., next.config.js)?
I resolved the issue, nextJS will automatically pick up variables defined in .env.local in renderer, but they need to be prefixed with NEXT_PUBLIC in order to use them on the client side.
Hi!
First, thank you so much for putting this together!
I had a question, regarding environment (or configuration) values. Do you have recommendations on how to configure the build with different configuration values e.g. api endpoint?
Right now I can see that we can use
.env
files inside renderer, but there's no obvious way of using environment variables in the main process (as macos doesn't load env variables when you launch outside the command line).Perhaps something like this can be used when compiling the main code https://www.npmjs.com/package/babel-plugin-transform-inline-environment-variables?
Thanks in advance!