babel-plugin-react-server
React Server transpilation
Example
In
var logger = logging;
Out
"use strict"; var logger = logging;
Installation
$ npm install babel-plugin-react-server
Usage
.babelrc
(Recommended)
Via .babelrc
Via CLI
$ babel --plugins react-server script.js
Via Node API
;
Configuration
A fully configured babel plugin in your babelrc would look be
Trim
A substring to trim off the front of the module name
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
token: "__LOGGER__"