A Nano JSX Template for building Isomorphic JSX Apps.
# download
npx degit nanojsx/template nano
# directory
cd nano
# install
npm i
# development (on http://localhost:3000/)
npm start
# production
npm run build
# serve (on http://localhost:3000/)
npm run serve
root
βββ public # all your static files
βββ src
β βββ client # bundles for hydration
β βββ components # your custom components
β βββ layouts # your app's layouts
β βββ pages # your pages
β βββ server # all server-side code
Every file in /client
will be bundles separately.
All the things below will hopefully be implemented soon.
- Auto refresh browser on changes
- Improve Service Worker cache strategy
- Pre-Render to static HTML
On localhost you may experience the following error when LazyLoading while switching routes:
Uncaught (in promise) ChunkLoadError: Loading chunk
This is related to the disabled browser option:
Allow invalid certificates for resources loaded from localhost.
Fix for Google Chrome
In the Chrome address bar, type chrome://flags/#allow-insecure-localhost and enable the option.
Fix for Firefox
No supported option to disable for localhost only.