E
E
evgenin2021-06-18 23:16:26
React
evgenin, 2021-06-18 23:16:26

How to change default react script ${path}?

The default is to run the index.html file and the script from /src/index.js,
but how to run the script from:

  1. index2.html file and script from /resources/js/app2.js
  2. i index3.html file and script from /resources/js/app3.js

....
60ccff3f3b328504410874.png

Perhaps you can prescribe it somehow?
"scripts": {
"test": "react-scripts start --appHtml="/public/index2.html" --appIndexJs="/resources/js/applications/frontend/components/app",

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrew Hecc, 2021-06-19
@evgenin

For any custom stuff, you will have to write your own webpack config. Create React App allows you to quickly throw in a project, but is rather weakly customizable at a structural level.
What you need is just different entry points to the application.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question