This project shows how both react-union and react-union-scripts can be used within Liferay portal platform.

Running the example

git clone

cd react-union/boilerplates/react-union-boilerplate-liferay-basic

yarn && yarn start


1. Setup union.config.js

By default union.config.js is configured to:

  • With yarn start you run development server over localhost:3300.
  • There is one SampleApp application.

2. Mock Liferay output and run development server

  • The HTML template used while running DEV server can be found in public/SampleApp/index.ejs file.
  • Run yarn start to start DEV server.

3. Create Liferay portlets that render widget descriptors

4. Customize liferay-theme

Base of ./liferay-theme is generated by themes-generator. We just made few changes:

  • added js/widgets folder - the target of yarn build:liferay
  • added templates/union.ftl template - generated