serve -s build
command in NodeJS (providing your React application is bootstrapped with create-react-app
).create-react-app
CLI tool.npm run build
commandindex.htm
file within the Pages with Flow Logic
folder of your bespoke BSP Application in SAP.react-app/build/index.html
file into the index.htm
file of the BSP application in SAP.index.html
file should look something like this:<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="https://blogs.sap.com/favicon.ico" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<meta name="theme-color" content="#000000" />
<link rel="manifest" href="https://blogs.sap.com/manifest.json" />
<link
href="https://blogs.sap.com//unpkg.com/fiori-fundamentals@latest/dist/fiori-fundamentals.min.css"
rel="stylesheet"
/>
<title>Name of your React App</title>
<link href="https://blogs.sap.com/static/css/2.01ad9b74.chunk.css" rel="stylesheet" />
<link href="https://blogs.sap.com/static/css/main.36497136.chunk.css" rel="stylesheet" />
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<script>
// ... some generated script
</script>
<script src="/static/js/2.f0e93c7f.chunk.js"></script>
<script src="/static/js/main.500df8a2.chunk.js"></script>
</body>
</html>
Ctrl + X
) the contents of the script
tag which contains inline JavaScript (just underneath the div
with the ID of root
);<script>
// ... some generated script
</script>
<SCRIPT SRC="script.js"></SCRIPT>
script.js
file within your MIMEs
folder of the BSP Application you created in step 1.<script>
tags.MIMEs
folder of the BSP Application./static
/css
/js
css
and js
files that were generated as part of your React/ NodeJS build
command in the above two folders.// for the following stylesheets and scripts
<LINK HREF="./static/css/2.7480248d.chunk.css" REL="stylesheet">
<LINK HREF="./static/css/main.5facb584.chunk.css" REL="stylesheet">
<SCRIPT SRC="./static/js/2.24f01946.chunk.js"></SCRIPT>
<SCRIPT SRC="./static/js/main.fe078c32.chunk.js"></SCRIPT>
js
and css
file contents into their corresponding BSP Application files.build
command by following the above steps.index.htm
should look something like this:<!doctype HTML>
<HTML LANG="en">
<HEAD>
<META CHARSET="utf-8" />
<LINK REL="shortcut icon" HREF="./favicon.ico" />
<META NAME="viewport" CONTENT="width=device-width,initial-scale=1" />
<META NAME="theme-color" CONTENT="#000000" />
<LINK REL="manifest" HREF="./manifest.json" />
<TITLE>Name of your React App</TITLE>
<LINK HREF="./static/css/2.7480248d.chunk.css" REL="stylesheet">
<LINK HREF="./static/css/main.5facb584.chunk.css" REL="stylesheet">
</HEAD>
<BODY>
<NOSCRIPT>You need to enable JavaScript to run this app.</NOSCRIPT>
<DIV ID="root"></DIV>
<SCRIPT SRC="script.js"></SCRIPT>
<SCRIPT SRC="./static/js/2.24f01946.chunk.js"></SCRIPT>
<SCRIPT SRC="./static/js/main.fe078c32.chunk.js"></SCRIPT>
</BODY>
</HTML>
Test
option (just underneath Activate
).build
process of your front-end framework of choice and upload the generated files to your SAP system as a BSP application as described above.You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
8 | |
7 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |