How to Covert Your Webpack HTML Project to React without Using Create-React-App

Weijing Jay Lin
Feb 25, 2022

--

To convert your WebPack or HTML project to React is actually pretty simple:

  1. You need install react-scripts dependency. Make sure it is react-scripts instead of react-script , mind the “s” to prevent the typo issue.
  2. Make sure you have public folder with index.html file and and src folder with index.js file.
  3. Add start script with: `“start”: “react-scripts start”`.

As now, you can run the script by using yarn start to boot your application.

The good thing about using react-scripts instead of create-react-app is that you can minimize the effort on moving files arounds. Plus, react-scripts is actually hot load build in, so you don’t need config complex config file.

--

--

Weijing Jay Lin
Weijing Jay Lin

Written by Weijing Jay Lin

A software engineer entrepreneur in San Francisco Bay Area.

No responses yet