Ensure development logging code is stripped out in production
From !5385 (comment 2920125482)
@gitlab/ui's dev logging: it is not stripped out of the production build.The
isDevcheck is always run by thelogWarningfunction, even in production.It looks like
process.env.NODE_ENVis not replaced with"production", e.g., in https://app.unpkg.com/@gitlab/ui@126.3.0/files/dist/directives/outside/outside.js#L35. So there's clearly something not quite right with out build set up.Having said all of that, everything consumes
@gitlab/uifrom source nowadays, so it matters more how tools like Webpack and Vite handle these things.
Tasks
-
Inspect the Webpack production build of gitlab-org/gitlabto determine whether logging statements are stipped -
Do the same for the Vite production build