The non-map routes get a near perfect Lighthouse performance score, and even the map route scores in the mid 70s (out of 100), which is outright decent for a web mapping application.
❗️Pro Tip: Use Yarn to install dependencies 3x faster than NPM!
git clone https://github.com/tomwayson/esri-preact-pwa cd tomwayson/esri-preact-pwa npm install npm run build npm start
Offline Caching (via
SASS & Autoprefixer
Asset Versioning (aka "cache-busting")
ES2015 (ES6) and ES2016 (ES7) support
Hot Module Replacement (HMR) for all files
Preact's Developer Tools
Any of the following commands can (and should
If using Yarn, all instances of
npmcan be replaced with
$ npm run build
Compiles all files. Output is sent to the
$ npm start
Runs your application (from the
dist directory) in the browser.
$ npm run watch
start, but will auto-compile & auto-reload the server after any file changes within the
Preact Developer Tools
You can inspect and modify the state of your Preact UI components at runtime using the React Developer Tools browser extension.
- Install the React Developer Tools extension
- Import the
preact/devtoolsmodule in your app
- Reload and go to the 'React' tab in the browser's development tools