Production vs Development Notes
Development
- Caching: Browsers cache
bundle.jsaggressively. If you update the@bagisto-native/corepackage, remember to manually copy the newbundle.jsto your public folder again. - Source Maps: The bundle is minified. Debugging inside
bundle.jscan be difficult. Rely on console logs from your React components instead.
Production
- Versioning: It is good practice to append a version query string to the script src to bust caches on new deployments:tsx
<Script src="/bundle.js?v=1.0.1" /> - Performance: The bundle is relatively small, but ensure your CDN serves it with correct compression (gzip/brotli).
Next Steps
- Understand Making App Native-Ready
- Learn about Registering Bridge Components
- Explore Core Module
