I used yarn create nw-react-app react-nw which created a new project in react-nw.
In package.json, I see { ..., "main":"index.html", ...} but after project creation, there is no index.html in the root folder.
I created a main.js file in the root folder and added {..., "node-main":"main.js", ...} to the package.json then started the project via yarn start, but the project still loaded the public/index.html file.
Then I renamed the public folder to public2 and ran yarn start again only the see this error message:
Could not find a required file.
Name: index.html
Searched in: /Users/denny/Projects/hub/denny-cc/agas/HomePage/demosetupv1/packages/react-nw/public
# nw-react-scripts start exited with code 1
main and node-main are ignored which is not I expected.
My question is how can I enforce nw-react-script loading from .js file instead of always loading from public/index.html?
Hi,
I used
yarn create nw-react-app react-nw
which created a new project inreact-nw
. Inpackage.json
, I see{ ..., "main":"index.html", ...}
but after project creation, there is noindex.html
in the root folder.I created a
main.js
file in the root folder and added{..., "node-main":"main.js", ...}
to thepackage.json
then started the project viayarn start
, but the project still loaded thepublic/index.html
file.Then I renamed the
public
folder topublic2
and ranyarn start
again only the see this error message:main
andnode-main
are ignored which is not I expected.My question is how can I enforce
nw-react-script
loading from.js
file instead of always loading frompublic/index.html
?