Ich beginne mit der Create React App zu spielen, aber ich kann nicht verstehen, wie die index.js
innerhalb index.html
geladen wird. Der HTML-Code ist dies:Erstellen React App index.html und index.js Verbindung
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<!--
Notice the use of %PUBLIC_URL% in the tag above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
</head>
<body>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start`.
To create a production bundle, use `npm run build`.
-->
</body>
</html>
Aber ich kann nicht überall den Import der index.js
sehen. Wo ist die Verbindung? Was ich vermisse?
Wie dienen Sie Ihren Inhalten? –
Ich habe nichts Standard geändert, ich mache nur das: 'create-react-app my-app' und ich öffne das Projekt mit webstorm, dann mache ich npm start, aber meine Frage ist, wie index.html das wissen muss lade index.js? wo ist schreiben? – Piero
https://webpack.github.io/docs/webpack-dev-server.html Webpack-dev-Server behandelt dies für Sie in der Entwicklung. –