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

feat: add babel-plugin-formatjs to babel-preset-mc-app #3672

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ragafus
Copy link
Contributor

@ragafus ragafus commented Dec 9, 2024

Summary

The goal of this PR is to add babel-plugin-formatjs to the babel-preset-mc-app and mc-scripts packages in order to avoid bloating bundles with useless data from formatjs messages (description, defaultMessage props).

Description

A couple of flags are added (see https://formatjs.github.io/docs/tooling/babel-plugin/#options):

  • i18nAst: Pre-parse defaultMessage into AST for faster runtime perf
  • i18nRemoveDefaultMessage: Remove defaultMessage field in generated js after extraction

@ragafus ragafus self-assigned this Dec 9, 2024
Copy link

vercel bot commented Dec 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mc-app-kit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2024 0:05am
merchant-center-application-kit-components-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 11, 2024 0:05am

Copy link

changeset-bot bot commented Dec 9, 2024

🦋 Changeset detected

Latest commit: 53c3952

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 36 packages
Name Type
@commercetools-frontend/babel-preset-mc-app Minor
@commercetools-frontend/mc-scripts Minor
@commercetools-frontend/jest-preset-mc-app Minor
@commercetools-applications/merchant-center-template-starter-typescript Minor
@commercetools-applications/merchant-center-template-starter Minor
@commercetools-applications/merchant-center-custom-view-template-starter-typescript Minor
@commercetools-applications/merchant-center-custom-view-template-starter Minor
@commercetools-local/playground Minor
@commercetools-backend/eslint-config-node Minor
@commercetools-backend/express Minor
@commercetools-backend/loggers Minor
@commercetools-frontend/actions-global Minor
@commercetools-frontend/application-components Minor
@commercetools-frontend/application-config Minor
@commercetools-frontend/application-shell-connectors Minor
@commercetools-frontend/application-shell Minor
@commercetools-frontend/assets Minor
@commercetools-frontend/browser-history Minor
@commercetools-frontend/codemod Minor
@commercetools-frontend/constants Minor
@commercetools-frontend/create-mc-app Minor
@commercetools-frontend/cypress Minor
@commercetools-frontend/eslint-config-mc-app Minor
@commercetools-frontend/i18n Minor
@commercetools-frontend/jest-stylelint-runner Minor
@commercetools-frontend/l10n Minor
@commercetools-frontend/mc-dev-authentication Minor
@commercetools-frontend/mc-html-template Minor
@commercetools-frontend/notifications Minor
@commercetools-frontend/permissions Minor
@commercetools-frontend/react-notifications Minor
@commercetools-frontend/sdk Minor
@commercetools-frontend/sentry Minor
@commercetools-frontend/url-utils Minor
@commercetools-local/visual-testing-app Minor
@commercetools-website/components-playground Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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

Successfully merging this pull request may close these issues.

1 participant