Skip to content

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.

About

๐Ÿ“„ Nano JSX Template using Isomorphic JSX.

Resources

License

Stars

14 stars

Watchers

1 watching

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

 
 
 

Contributors