This repo has a boilerplate example to start a react app without using create-react-app. The stack is:
- React 17 + React Dom
- React Router 5
- i18next for localization
- snowpack as the building tool
- Jest for testing
- ESLint
npm install
Snowpack builds the app as an ECMAScript Module, which is loaded in index.html
as type=module
:
<script type="module" src="/dist/index.js"></script>
So to see the app working, you should run it in an HTTP server, which is already provided by Snowpack. Just run
snowpack dev
and go to http://localhost:8080
and check it out! Everytime you change the code, the HMR will keep the browser up-to-date!
To build the app for production just run
snowpack build