App with React API without tools as Webpack or Babel

There are tools like Webpack or Babel that seem indispensable when we work as frontends. But, could we make an application without such tools? Even without package.json or bundles? And being able to continue using the React API? Let's see how.

Getting the hello world

We are going to start our App with just two files: index.html and App.js:

.
├── index.html
└── App.js

We are going to load our App.js file inside the index.js adding the type="module":

Then, in our App.js file, we are going to use Preact loaded directly using unpkg.com. Unpkg is a fast, global content delivery network for everything on npm. The reasons to choose Preact instead of React are: