Open AshotN opened 1 week ago
There's no reason to use @adminjs/bundler
locally but every AdminJS panel hosted remotely must have NODE_ENV
set to production
to bundle/serve minified files. It's set explicitly to production
because there were lots of questions why people's admin panels load slowly in production or weigh over 50 MBs.
I have a staging environment, which acts the same as prod for most things. In that situation @adminjs/bundler
changes my NODE_ENV
and causes issues.
It shouldn't be a packages responsibility for the user to set the correct NODE_ENV
. Nor should a package overwrite process.env
Contact Details
No response
What happened?
If you import @adminjs/bundler
Your NODE_ENV gets set to production.
What is the point of that?
Bug prevalence
Always
AdminJS dependencies version
@adminjs/bundler v3.0.0
What browsers do you see the problem on?
No response
Relevant log output
No response
Relevant code that's giving you issues