Giter Site home page Giter Site logo

menglinmaker / pwa-vite-react-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
15.0 1.0 3.0 26.85 MB

A boilerplate GitHub template to create repositories for: PWA using Vite, React and TypeScript

Home Page: https://pwa-vite-react-boilerplate.netlify.app/

License: MIT License

HTML 16.00% TypeScript 43.40% SCSS 40.59%
boilerplate-front-end boilerplate-template boilerplates pwa pwa-boilerplate react react-boilerplate template vite vite-react

pwa-vite-react-boilerplate's Introduction

PWA Vite React Boilerplate

GitHub
 
 

->> Demo Page <<-

 
 
 

Boilerplate Techstack

This boilerplate is already preinstalled with:

 
 
 

How To Use

Generate GitHub repository

  1. Generate your repository from this template: Click Here
  2. Clone code to your to remote repository: git clone https://github.com/user-name/repository-name

Note: supply your GitHub user-name and repository-name.

Development

The following terminal commands are from Vite.js command line interface. Also check the package.json file "scripts" section for all command line scripts.

Note: npm can also be replaced with yarn or pnpm...

Run development website locally

npm run dev
  • There is no PWA functionality in development mode.

Build production files - to "dist" folder

npm run build
  • Ensure there are no TypeScript errors, otherwise complilation will be aborted.
  • Build files will be placed in the "dist" folder by default.
  • To change build folder, add this line to vite.config.ts defineConfig:
build: {
  outDir: './build-directory'
},

Run production build website locally

npm run preview

pwa-vite-react-boilerplate's People

Contributors

dependabot[bot] avatar menglinmaker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

pwa-vite-react-boilerplate's Issues

BodyScroll and safe-area-env

Hello,
Thank you so much for your React PWA project with Vite! It's an excellent foundation! I would like to seek your expertise on two specific points:

Disabling bodyscroll on Safari iOS:
I’ve tried various approaches to disable body scrolling on Safari iOS, but so far, I haven't found a satisfactory solution. Do you have any recommendations or tips on how to achieve this effectively? The goal is to have the app behave like a Native app.

Using environment variables for the body's safe area:
To ensure better integration with smartphones and their notches, I'm looking for a clean way to use environment variables to handle the body's safe area in the PWA. Do you have any advice or best practices to share on this matter?

Thank you very much!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.