Enable compile-once and compile-with-DLL options for dev-server process
What does this MR do?
Enables the use of two environment variable modifiers to the dev-server process.
-
DEV_SERVER_STATIC
: compiles webpack once and serves it from disk -
WEBPACK_VENDOR_DLL
: compiles vendor libraries into a DLL file saved to disk
These both will reduce the memory requirements of webpack-dev-server by removing some of the modules from the compilation step that would otherwise be retained in memory. The former will disable the dev-server process entirely, but will require a full recompile whenever frontend changes are made. The later will prevent modules that are less commonly modified (third-party libraries) from being retained in memory, but any change to our dependencies will trigger a full recompile.
The default (for now) is still to retain everything in memory to optimize for minimal recompile time, but these options may be employed by those with fewer compute resources or those who do not intend to change the frontend code.
Relates to: #32152 (closed)
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Closes #34096 (closed)