What is bundle.js?
bundle.js is a pre-bundled JavaScript file provided by @bagisto-native/core.
It contains:
- Turbo / Hotwire: The core navigation library.
- Stimulus: The Javascript framework for HTML.
- Bridge Component Controllers: The logic files located in
hotwire/controllers/(e.g.,ToastComponent,DynamicButtonComponent). - Native Bridge Library: The
@hotwired/hotwire-native-bridgecode that handles the actual implementation ofpostMessageto iOS/Android.
When this file runs in a browser (or WebView), it initializes the window.Stimulus application and registers all the "bridge--" controllers.
Next Steps
- Understand Why It Is Required
- Learn How to Include It Safely
- Explore Production vs Development Notes
