Use dynamic import for deno@gfm to avoid including ~15mb of dependencies for all sites.
- Dominant language
- TypeScript
- Stars
- 28
- Forks
- 30
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 4
Description
## Issue Type
Please inform the type(s) of issue(s) you are reporting:
- Feature Request
## Description
We are removing an unnecessary library that is included in all JavaScript bundles of the sites but is only used for rendering markdown previews. This library should not be part of the production build, as it is used only in the admin environment for environment-specific settings (admin v2). The goal is to replace this with a dynamic import to ensure that the library is only loaded when necessary, improving bundle size and performance in production.
## Steps to Reproduce (for bugs)
N/A
## Expected Behavior
The library for rendering markdown previews should be dynamically imported and only loaded when needed in the admin environment (admin v2), and not included in production builds. This will reduce the size of the JavaScript bundles for production.
## Actual Behavior
Currently, the library is included in all JavaScript bundles, even in production environments where it is not needed.
## Additional Context
This change will optimize the performance of the production site by removing unnecessary code, ensuring the markdown preview functionality remains intact in the admin environment only.
Contributor guide
Assessment
This issue has not been assessed yet.