Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grvpanchal/pwa-webpack
This is a blank PWA setup providing 100% result under Chrome Lighthouse audit
https://github.com/grvpanchal/pwa-webpack
Last synced: 21 days ago
JSON representation
This is a blank PWA setup providing 100% result under Chrome Lighthouse audit
- Host: GitHub
- URL: https://github.com/grvpanchal/pwa-webpack
- Owner: grvpanchal
- License: gpl-3.0
- Created: 2019-05-09T15:18:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T21:45:10.000Z (about 2 years ago)
- Last Synced: 2024-11-12T04:35:11.509Z (3 months ago)
- Language: JavaScript
- Size: 2.66 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# PWA Webpack Sample
This is a blank PWA setup providing 100% result under Chrome Lighthouse audit## Prerequisites
- nodejs: https://nodejs.org
- mkcert: https://github.com/FiloSottile/mkcert
- yarn: ``npm i -g yarn``## Setup
If you havent already installed mkcert for browser then run
```
mkcert -install
```Re-open the chrome browser to enable the installed certificates.
Create a certificate for localhost domain
```
mkcert localhost
```You will see a result similar as below
Copy the path of local CA and update your webpack.config.js. Remeber to add `rootCA.pem` at end of root CA path
```js
https: {
key: fs.readFileSync('./localhost-key.pem'),
cert: fs.readFileSync('./localhost.pem'),
ca: fs.readFileSync('/home/{user-home}/.local/share/mkcert/rootCA.pem')
},
```Install the modules
```sh
$ yarn install
```### STOP ALL LOCAL SERVERS ON PORT 80, 8080 AND 443
Start the project with HTTP 2.0
```sh
$ yarn start
```Start the project for PWA Score
```sh
$ sudo yarn start:pwa
```
Go to Chrome and open https://localhost with developers tool. Go to Audits tab and hit `Run audits`## Final Result
You will see a result similar to below image for HTTP2 `yarn start`
View the perfect PWA score with `sudo yarn start:pwa`