Skip to content

Commit 306533f

Browse files
author
danzeuss
committed
Adding documentation
1 parent 5680091 commit 306533f

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
id: adding-multiple-entry-points
3+
title: Adding multiple entry points
4+
---
5+
6+
Create React App comes with an embedded `index.html` and `index.js` which is shown when you're running the `app` at `http://localhost:3000`. In case you decided to add new `apps` (pages/entry point), please, follow the steps:
7+
8+
## Creating files
9+
10+
Please, create your `.html` and `.js` (Or TypeScript file). The embedded files come inside `public` and `src` folder.
11+
12+
## Add the new app in package.json
13+
14+
After creating the `app` files, you must specify it into the `appPages` inside the `package.json`. It should shape the following structure:
15+
16+
```json
17+
{
18+
"name": "login",
19+
"title": "login",
20+
"appHtml": "public/#.html",
21+
"appIndexJs": "src/#"
22+
}
23+
```
24+
25+
## Accessing the new app
26+
27+
Run `npm start` or `yarn start` and change the URL by referencing the new page, like `http://localhost:3000/#.html`

docusaurus/website/sidebars.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
],
4848
"Deployment": ["deployment"],
4949
"Advanced Usage": [
50+
"adding-multiple-entry-points",
5051
"custom-templates",
5152
"can-i-use-decorators",
5253
"pre-rendering-into-static-html-files",
@@ -55,4 +56,4 @@
5556
],
5657
"Support": ["troubleshooting"]
5758
}
58-
}
59+
}

0 commit comments

Comments
 (0)