My React.js app was created with this command:
npx create-react-app my-app
Now how can I convert this script section in package.json to run the app without react-scripts?
"scripts": {
"start": "NODE_ENV=development node_modules/react-scripts/bin/react-scripts.js start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
Should it be something like:
node index.js
How do I convert each option in that scripts section? Thanks
CodePudding user response:
When you create a React app with npx create-react-app my-app
you make your react app dependant of react-scripts.
If you no longer want to use this react-scripts who give you a lot of help you can follow this tutorial from the official documentation to eject yourself.
But you can't remove the dependency from an existing project, maybe you are considering to make a new one, and this tutorial will help you to achieve it !