# babel-plugin-react-server

> Babel plugin for React Server transpilation

Latest version **0.4.10** (published 2016-11-08) · 0 weekly downloads

## Install

```sh
npm install babel-plugin-react-server
pnpm add babel-plugin-react-server
yarn add babel-plugin-react-server
bun add babel-plugin-react-server
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.10 |
| Published | 2016-11-08 |
| First published | 2016-06-09 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Doug Wade |
| Maintainers | douglas.wade, gigabo, sresant |
| Keywords | react, server, babel, plugin, babel-plugin |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-react-server
- Repository: https://github.com/redfin/babel-plugin-react-server
- Homepage: https://github.com/redfin/babel-plugin-react-server#readme
- Issues: https://github.com/redfin/babel-plugin-react-server/issues
- npm.io page: https://npm.io/package/babel-plugin-react-server

## Dependencies (1)

- [react-server-module-tagger](https://npm.io/package/react-server-module-tagger.md) ^0.4.10

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.4.10 (latest) — 2016-11-08
- 1.0.0-alpha.2 (prerelease) — 2019-05-21
- 0.6.0 (asini-temp) — 2017-01-28
- 1.0.0-alpha.1 — 2019-05-10
- 1.0.0-alpha.0 — 2019-05-02
- 0.4.7 — 2016-08-27
- 0.4.4 — 2016-08-17
- 0.3.3 — 2016-06-30
- 0.0.1 — 2016-06-09

## README

# babel-plugin-react-server

React Server transpilation

## Example

**In**

```js
var logger = require('react-server').logging.getLogger(__LOGGER__);
```

**Out**

```js
"use strict";

var logger = require('react-server').logging.getLogger({ name: 'module.name', color: {} });
```

## Installation

```sh
$ npm install babel-plugin-react-server
```

## Usage

### Via `.babelrc` (Recommended)

**.babelrc**

```json
{
  "plugins": ["react-server"]
}
```

### Via CLI

```sh
$ babel --plugins react-server script.js
```

### Via Node API

```javascript
require("babel-core").transform("code", {
  plugins: ["react-server"]
});
```


## Configuration

A fully configured babel plugin in your babelrc would look be

```json
{
  "plugins": [
    ["react-server", {
      "trim": "my-project.components.",
      "token": "__LOGGER__"
    }]
  ]
}
```


### Trim

A substring to trim off the front of the module name

```javascript
{
    trim: "my-project.pages."
}
```

### Token

The token to replace in the source code with the module tag.  By default, uses
the default logger token `__LOGGER__`, and two future reserved tokens,
`__CHANNEL__` and

```javascript
{
    token: "__LOGGER__"
}
```

---
_Source: https://npm.io/package/babel-plugin-react-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
