This boilerplate focuses on keeping configuration to a minimum yet supporting all latest Typescript features for making it as easy and worry-free as possible to get started building a performance optimized React.js web application.
This project is open to updates by its users, I ensure that PRs are relevant to the community. In other words, if you find a bug or want a new feature, please help us by becoming one of the contributors ✌️ ! See the contributing section.
🚨 Before continuing:
Please consider:
The logic of this repo is structured in such a way that all you need to worry about is placing your
code in the src
directory (using src/index.tsx
as entry point).
I chose Rollup to handle the transpiling, compression, and any other transformations needed to get your Typescript code running as quickly and performant as possible.
There's two ways of running the app:
Development
yarn dev
Uses concurrently to run Rollup in watch mode (which means it will transpile the bundle js file when you save changes to your code), as well as a combo between an Express.js server and Liveserver which will automagically setup [hot-reload]() functionality so your browser reloads as you modify your source!
Build
yarn build
This command will build the public/bundle.js
, uglified and tree-shaken so it loads/runs faster.
This is the recommended hay of producing the production bundle you serve to your final users;
after the build completes simply copy the contents of the public
directory to a static content
delivery service such as AWS S3 or Github Pages, et voilà.
If, on the other hand, you would like to spin up the provided Express.js server with hot-reload turned off, just run:
yarn server
The ethos of this boilerplate is to provide a solid foundation, from there on you are owner of your project and get to decide on the rest of the stack to build upon.
And if you're looking for suggestions here are some that I have tried, tested, and love:
Fast prototyping
<link>
tags on the index.html
, and className
all your components as desired.Serious production-ready apps
Yes, thank you! This plugin is community-driven, most of its features are from different authors.
Please update the docs and tests and add your name to the package.json
file.
Thanks goes to these wonderful people (emoji key):
Jean Lescure 🚧 💻 📓 ⚠️ 💡 📖 |
Diana Lescure 📖 👀 🎨 |