React base app with some oompf
- Sourcemaps are generated on production build
tsc,eslintandstylelintare run on production build.- All of the assets will be compressed on production build.
- The build is be placed under
build/directory
- Vite is configured with React Refresh
- SWC is used instead of Babel
PostCSS is configured with the following plugins:
- Preset Env
- Nested CSS
- Normalize CSS
- Autoprefixer
- CSS Modules
- Web fonts are downloaded and bundled in the production build.
- Valid web font providers are:
- Google Fonts
- Bunny Fonts
- Fontshare
- Vite is configured to resolve absolute imports defined on
tsconfig.json
Only environment variables prefixed by APP_ will be passed to the application
Variables can be defined using:
.envfile- Use
.envfile to define secrets.
- Use
docker-composefile- Use
docker-composefile to define rest of the env variables.
- Use
The user defined environment variables are validated using the configuration at ./env.ts
The typings for environment variables are defined at ./src/declarations/env.d.ts.
The commit hash is passed to the application through the environment variable APP_COMMIT_HASH
vitestis used to run tests
stylelintis used to lint css fileseslintis used to lint javascript and typescript filestscis used to typecheck typescript filesunimportedto used to detect unused javascript and typescript files
Docker is setup to run vite on port 3000
- A workflow is setup to run when:
- new commit is pushed to develop branch
- or a pull request to develop branch is opened
- It checks for unused files, lint issues, failed tests and failed builds.
- A generic pull request template is included.