Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use dynamic import for deno@gfm to avoid including ~15mb of dependencies for all sites. #887

Open
mcandeia opened this issue Sep 27, 2024 · 0 comments

Comments

@mcandeia
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant