React Snowpack playground
Learning about React with Snowpack and some fun friends.
✨ Bootstrapped with Create Snowpack App (CSA).
Bootstrapped with CSA! The freshest and most local of webapps (via @brianmitchl)
Setup
yarn
Commands
# run dev mode, using fast refresh and snowpack's bundlessness
yarn start
# run build; produces a "bundle" with the webpack plugin
yarn build
# run serve on build folder; build first
yarn serve:build
Tech
Notes
- Newer syntax supported
?.
and??
- Code splitting
- Async routes work!
- Suspense fallback simulated with 5s delay
- Webpack "optimized" bundle works! (Makes hash.js chunks)
Things that sort of might work maybe
- React 17 JSX Transform
- With React 17 in some environments, you can omit the
import React from 'react'
but apparently that changes the way JSX works and that is not built intoesbuild
core, but there is a way to add a customized plugin to do the transform with a babel plugin - not tested here yet - another thread
- With React 17 in some environments, you can omit the