Answer the question
In order to leave comments, you need to log in
Why is create-react-app creating so many files?
npx create-react-app test
I create a react app with a team
. Next, I delete unnecessary files.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>React App</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(
<div className="app" />,
document.getElementById('root')
);
npm run build
folder in the root of this project, and it contains 100500 files. Where did they come from and why? Where did the workers come from if I deleted them (both the files themselves and from the code)? How to disable all this and make it to get ~ 1-2 js files at the output?Answer the question
In order to leave comments, you need to log in
What is in the build folder should not particularly worry. React has a lot of logic to optimize loading from the client side. Well, who said that React is for beginners? For beginners in such frameworks, as it were, there is nothing to do)
create-react-app appName creates an empty app from which the beginner only needs the app.js and app.css files to start developing. All other files are system or additional libraries. node_modules contains thousands of useful-useless libraries, but it makes little sense to look there, except perhaps for informational purposes.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question