Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/jest/README.tmpl.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# @swc/plugin-jest

`@swc/plugin-jest` is a drop-in replacement for `babel-jest` that uses SWC to transform your code, enabling significantly faster Jest-based testing. It integrates with Jest's transformation pipeline so you can run your test suite with minimal configuration changes.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop calling @swc/plugin-jest a babel-jest replacement

Users who choose packages from the README summary will install the wrong tool here. packages/jest/src/lib.rs:20-94 only implements Jest-hoist-style reordering of jest.mock/unmock/enableAutomock calls in visit_mut_stmt_like; it does not provide Jest's transformer interface. Describing this package as a “drop-in replacement for babel-jest” will send Jest users to a plugin that cannot run their test suite on its own.

Useful? React with 👍 / 👎.


${CHANGELOG}
2 changes: 2 additions & 0 deletions packages/loadable-components/README.tmpl.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# loadable-components

`@swc/plugin-loadable-components` transforms `@loadable/component` dynamic imports to support server-side rendering (SSR) and code splitting. It is the SWC equivalent of the `@loadable/babel-plugin` and enables the full `@loadable/component` SSR workflow when using SWC as your compiler.

## Config

```json
Expand Down
2 changes: 2 additions & 0 deletions packages/noop/README.tmpl.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# @swc/plugin-noop

`@swc/plugin-noop` is a no-operation SWC plugin that passes code through without any transformation. It is useful for testing the SWC plugin system, benchmarking plugin infrastructure overhead, and as a template for building new plugins.

${CHANGELOG}
2 changes: 1 addition & 1 deletion packages/react-remove-properties/README.tmpl.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# react-remove-properties

See https://nextjs.org/docs/architecture/nextjs-compiler#remove-react-properties for more information.
`@swc/plugin-react-remove-properties` removes React component properties (such as `data-testid`) from your production builds. This is useful for stripping test-only attributes that you don't want shipped to end users. See https://nextjs.org/docs/architecture/nextjs-compiler#remove-react-properties for more information.

## Config

Expand Down
2 changes: 2 additions & 0 deletions packages/relay/README.tmpl.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### `@swc/plugin-relay`

`@swc/plugin-relay` compiles Relay GraphQL `graphql` tagged template literals into the corresponding Relay-generated artifact imports. It is the SWC equivalent of `babel-plugin-relay`, enabling projects that use the Relay framework to leverage SWC for faster compilation.

#### Setup

```sh
Expand Down
2 changes: 1 addition & 1 deletion packages/remove-console/README.tmpl.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# remove-console

See https://nextjs.org/docs/architecture/nextjs-compiler#remove-console for more information.
`@swc/plugin-remove-console` strips `console.*` calls from your production builds, helping to reduce bundle size and avoid leaking debug information to end users. You can optionally exclude specific console methods (e.g. `console.error`) from removal. See https://nextjs.org/docs/architecture/nextjs-compiler#remove-console for more information.

## Config

Expand Down
2 changes: 2 additions & 0 deletions packages/styled-components/README.tmpl.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### `@swc/plugin-styled-components`

`@swc/plugin-styled-components` is the SWC equivalent of `babel-plugin-styled-components`. It adds display names to styled-components for better debugging, generates deterministic class names for server-side rendering (SSR), and enables other optimizations provided by the styled-components Babel plugin.

#### Setup

```sh
Expand Down
2 changes: 2 additions & 0 deletions packages/styled-jsx/README.tmpl.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# @swc/plugin-styled-jsx

`@swc/plugin-styled-jsx` transforms `<style jsx>` tags in JSX components into scoped CSS, providing component-level style isolation. It is the SWC equivalent of the `styled-jsx` Babel plugin used by Next.js.

${CHANGELOG}
2 changes: 2 additions & 0 deletions packages/swc-confidential/README.tmpl.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @swc/plugin-swc-confidential

`@swc/plugin-swc-confidential` encrypts string literals marked with the `/*#__CONFIDENTIAL__*/` comment using AES encryption at build time. This lets you ship sensitive strings (such as feature flag names or identifiers) in an obfuscated form so they are not trivially readable in your production bundle.

## Usage

.swcrc:
Expand Down
2 changes: 2 additions & 0 deletions packages/swc-magic/README.tmpl.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @swc/plugin-swc-magic

`@swc/plugin-swc-magic` processes magic annotations from the `@swc/magic` package, such as `markAsPure`, which annotates expressions so the SWC minifier can eliminate them as dead code during tree-shaking.

## Usage

.swcrc:
Expand Down
2 changes: 2 additions & 0 deletions packages/swc-sdk/README.tmpl.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# @swc/plugin-swc-sdk

`@swc/plugin-swc-sdk` provides build-time transformations from the `@swc/sdk` package. It supports converting static imports annotated with `/*#__DYNAMIC__*/` into dynamic imports, and processes `markAsPure` annotations so the SWC minifier can tree-shake the marked expressions.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove the nonexistent markAsPure claim from swc-sdk

This summary advertises a transform that the plugin source does not implement. In the code I checked, packages/swc-sdk/transform/src/config.rs:7-35 only exposes flag and dynamicImports settings, and packages/swc-sdk/transform/src/lib.rs:388-391 only invokes transform_flag in addition to the /*#__DYNAMIC__*/ handling earlier in the visitor. There is no markAsPure matcher or visitor anywhere under packages/swc-sdk/transform/src, so readers who depend on this documented behavior will not get the optimization they were promised.

Useful? React with 👍 / 👎.


# Usage

.swcrc:
Expand Down
2 changes: 2 additions & 0 deletions packages/transform-imports/README.tmpl.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# transform-imports

`@swc/plugin-transform-imports` rewrites named imports into direct, member-level imports to reduce bundle size. For example, `import { Button } from 'react-bootstrap'` becomes `import Button from 'react-bootstrap/lib/Button'`, which allows bundlers to include only the specific module rather than the entire library.

## Config

```json
Expand Down
Loading