Skip to content

Feature: Show which runtimes need or don't need plugins #3169

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Overview

Today, plugin pages say what presets plugins are included in and link to a few docs such as TC39 proposals. For example, https://babeljs.io/docs/babel-plugin-transform-class-properties:

...but the pages never explicitly say what runtimes (e.g. browsers / Node.js / other server runtimes) do or don't need the plugins. This means it can be hard for folks who aren't deeply entrenched in the JS ecosystem to know whether they need a plugin.

Proposal: could plugin pages have some kind of compatibility indicator added? Perhaps an indication of which common browser, Bun, Deno, and LTS Node.js versions support the feature?

Additional Information

MDN does the equivalent of this really nicely on their docs. For example, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Public_class_fields:

  • Mentions it's baseline widely available at the top of the page, with links to more info
  • Shows the browser & runtime support versions at the bottom of the page

@nicolo-ribaudo pointed me towards https://github.com/babel/babel/blob/main/packages/babel-compat-data/data/plugins.json as already having info on support targets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions