All products

Fix Lingui SWC plugin errors with AI

Identify the compiler your app actually runs and compare its accepted plugin range before changing packages or moving to another transform.

Fix Lingui SWC plugin errors with AI when a dependency update breaks a build that previously translated its interface correctly. The swc-plugin-compatibility skill starts with the host and its resolved version. A bundled compiler and a separately installed SWC package can require different plugin releases, even inside the same repository.

A successful build also deserves a functional check. If a transformation never runs, the application can still display raw message components. Reviewing one known label is more informative than repeatedly installing a newer package and hoping the error disappears.

What it does

  • Identify which dependency supplies the compiler in the affected app.
  • Use the lockfile to confirm the version that actually resolved.
  • Compare the host’s accepted range with the plugin’s version table.
  • Check the Lingui core peer requirement before installing the candidate.
  • Assess whether a native transform or Babel fallback changes other project behaviour.

Install and use

  1. Give the agent the authorised project configuration, lockfile and a redacted error. Changes need the project’s package manager and official compiler packages.
  2. Ask, “One app builds and the other leaves messages untranslated. Compare their hosts and propose the smallest compatible change.”
  3. After applying an approved change, check one translated interface message in the resulting application.

FAQ

Source

Made by Lingui. Original skill: swc-plugin-compatibility, published on GitHub under the MIT licence.

View on GitHub