Skip to content

Deploy a ReactJS App as a Script Application

What You Will Learn In This Tutorial

  • Enrichment of new or existing NPM based projects to easily upload built application to HCL Digital Experience (DX).
  • Optional migration of the NPM project to use Webpack bundler.

Where To Get The Sample Code

Tip

Sample codes are available in GitHub: Deploy a React App to DX as a ScriptApp.

Note

For optimal loading of multiple Script Applications in a single page, custom Webpack bundling is needed. For more information, see Deploy Multiple Script Applications with Shared Dependencies.

Prerequisites

Tip

See the detailed information here.

How To Bundle and Deploy Applications to DX

Tip

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.

Optional: How To Migrate Apps to use Webpack and Deploy as Script Application

Tip

Follow the detailed steps here.