Static Assets Differences with PWA Kit
PWA Kit uses a traditional Webpack-based approach with SVG sprites and utility functions for responsive images. Storefront Next leverages Vite’s native asset handling with a modern component-based approach for responsive images and tree-shaken icon imports. The shift simplifies asset management while providing more powerful responsive image capabilities through the DynamicImage component.
| Aspect | PWA Kit | Storefront Next |
|---|---|---|
| Build Tool | Webpack | Vite |
| Static Directory | app/static/ | public/ |
| Asset URLs | getAssetUrl() helper | Direct / paths |
| Icon System | SVG sprite sheet | Tree-shaken React icons |
| Image Component | Custom with SSR preload | <picture> with React 19 preload |
| Responsive Images | Utility functions | DynamicImage component |
| Font Strategy | Chakra UI defaults | Tailwind CSS defaults |
| CSP Headers | Explicit in ssr.js | Framework-handled |
PWA Kit:
Storefront Next:
PWA Kit:
Storefront Next:
PWA Kit:
Storefront Next:
- Lazy loading default: Both default to
loading="lazy". - B2C Commerce images: Both use Dynamic Imaging Service (
?sw={width}). - System fonts: Neither bundles custom web fonts.
- SSR awareness: Both handle preloading for above-fold images.
- Aspect ratio handling: Both manage layout stability.
-
Asset Path Changes
- Replace
getAssetUrl()with direct/paths. - Move files from
app/static/topublic/.
- Replace
-
SVG Icons
- Replace sprite imports with
lucide-reacticons. - Or create individual SVG component imports.
- Replace sprite imports with
-
Image Component
- Replace custom Image with DynamicImage.
- Update width props to new format.
-
Responsive Images
- Convert utility function usage to DynamicImage props.
- Breakpoint format changes from array to object.