Skip to content

Enable compile-once and compile-with-DLL options for dev-server process

Mike Greiling requested to merge 34096-allow-gdk-to-serve-webpack-from-disk into master

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

Availability and Testing

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)

Edited by 🤖 GitLab Bot 🤖

Merge request reports