Skip to content
/ template Public template

πŸ“„ Nano JSX Template using Isomorphic JSX.

License

Notifications You must be signed in to change notification settings

nanojsx/template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

45 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Nano JSX Template

A Nano JSX Template for building Isomorphic JSX Apps.

Download

# 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

Structure

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.

TODOs

All the things below will hopefully be implemented soon.

  • Auto refresh browser on changes
  • Improve Service Worker cache strategy
  • Pre-Render to static HTML

LazyLoading ChunkLoadError on localhost

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.