Skip to content

Deploy Multiple Script Applications with Shared Dependencies

What You Will Learn In This Tutorial

  • Creation of a Gradle project to simplify working with shared libraries in HCL Digital Experience (DX).
  • Update bundling of new or existing NPM based projects to exclude dependencies and use the libraries in a DX Module.
  • Combine DX Module and Script Applications Projects.

Where To Get The Sample Code

Prerequisites

Tip

See the detailed information here.

How to Bundle Dependencies as DX Modules

Tip

Follow the detailed steps here.

Quick Notes:

  • Set a unique rootProject.name (i.e: Reactv18r2) in DxModule/settings.gradle.
  • The Webpack profile/config file (i.e: webpack.dxmodules.js) that will be used to build the submodule is defined in the build-dxsubmodule script in its own package.json.
  • If a group of dependencies has conflicts with another group (i.e: React v16 vs v18), you'll need to create separate sub-modules for them.
  • Take note of all the output locations and filenames of the DLL manifest, for each of the submodules defined, in the DLLPlugin portion of their DxModule/<SubModule>/webpack.<dxmodules>.js files.

Important Things to Note

Note

Check the information here.

How To Build and Deploy DX Modules

Tip

Follow the steps here.

Optional: How to Manually Upload the DXModule EAR File

Tip

Follow the steps here.

Tip

Follow the steps here.

How To Bundle and Deploy a Script Application Without Its Dependencies

Tip

For each of your script applications, follow the detailed steps here.

Quick Notes:

  • Set a unique wcmContentName (i.e: EducSampleScriptApp) setting in package.json.
  • Make sure the contentRoot setting in package.json matches the build or distribution folder.

How To Build and Deploy Script Applications

Tip

Follow the steps here.

Optional: How to Build and Deploy the DXModule and All Script Applications

Tip

Follow the steps here.