https://github.com/lgdd/lfr-react-remote-app
Template for React Remote App in Liferay DXP/Portal.
https://github.com/lgdd/lfr-react-remote-app
liferay liferay-dxp liferay-portal react remote-app
Last synced: about 1 month ago
JSON representation
Template for React Remote App in Liferay DXP/Portal.
- Host: GitHub
- URL: https://github.com/lgdd/lfr-react-remote-app
- Owner: lgdd
- Created: 2022-07-12T07:50:03.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-02-16T15:19:11.000Z (over 2 years ago)
- Last Synced: 2025-03-12T22:18:11.681Z (over 1 year ago)
- Topics: liferay, liferay-dxp, liferay-portal, react, remote-app
- Language: JavaScript
- Homepage:
- Size: 162 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# Liferay React Remote App (Client Extension)
This is a template intended for tests & demos. The webpack configuration included is not optimized for production environments.
## Using this template
By default, the custom element name is `lfr-react-remote-app`. You can change it in [src/index.js](src/index.js#L7):
```js
const ELEMENT_ID = 'lfr-react-remote-app';
```
This template is using a custom webpack configuration to build your application in a single file (`bundle.js`) making easier to create a _Remote App_ in Liferay DXP/Portal.
You can find multiple scripts in [package.json](package.json#L14) not using `react-scripts`:
- `start`: watch files under `src/` and run `serve` if there is any change which allows you to keep the single file approach on localhost.
- `serve`: run the `build` script and serve static files under the `build` folder on port `3000`.
- `build`: transpile your application into a `build` folder using webpack and its [configuration](webpack.config.js).
> You can still run the standard react scripts with `start:react` and `build:react`.
## Deploy to Netlify
> Documentation: https://docs.netlify.com/site-deploys/create-deploys/
Why **Netlify**? Because **it's awesome!** Once your repository is linked, you have an automatic deployment each time you push changes to your repository. And by default, Netlify uses `cache-control: public, max-age=0, must-revalidate` to serve your application which means that you are able to see each changes live. Very useful for tests and demos, and if needed you can have [custom HTTP Headers](https://docs.netlify.com/routing/headers/) using a config file. Cherry on the cake, they provide a very fair free tier based on bandwith and build frequency (cf. [Pricing](https://www.netlify.com/pricing/)).