We’re currently making rapid changes to the product so our docs may be out of date. If you need help, please email firstname.lastname@example.org.
Here are a couple of examples of dynamic import usage on Forem:
- The Onboarding flow.
- In homepage (followed tags).
Forem uses webpacker, so what webpack will do is create separate bundles for code that is dynamically imported. So not only do we end up loading code only when we need it, we also end up with smaller bundle sizes in the frontend.
For a great deep dive into dynamic imports, there is a great article from community member @goenning about dynamic import usage, How we reduced our initial JS/CSS size by 67%.