Standalone build an dynamic basePath in next.config.mjs
Unanswered
Toyger posted this in #help-forum
ToygerOP
I have a dynamic
This is working fine with a non-standalong build using
If I explicitly set the
Is it possible to keep it dynamic with a standalone build? I've tried a few variations but haven't been able to figure it out and searches haven't given me anything.
Thx,
Marty
basePath based on NODE_ENV in my configuration file.basePath: isProd ? "/public" : undefined,This is working fine with a non-standalong build using
ENV NEXT_PUBLIC_NODE_ENV=production in the Dockerfile but this isn't working for a standalone build.If I explicitly set the
basePath to /public it works as expected. Is it possible to keep it dynamic with a standalone build? I've tried a few variations but haven't been able to figure it out and searches haven't given me anything.
Thx,
Marty