Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-esx-ssr

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-esx-ssr

Babel plugin for the Server-Side which converts JSX to ESX for performance gains.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

babel-plugin-esx-ssr

Babel plugin for the Server-Side which converts JSX to ESX for performance gains.

Status

Experimental.

Example

In

import React from 'react'

const data = { value: 'hi '}

const Component = ({value}) => (
  <div>
    <p> some content </p>
    <p> some {value} </p>
  </div>
)

const App = () => <Component {...data}/>

export default App

Out

const esx = require('esx')();

import React from 'react';
const data = {
  value: 'hi '
};

const Component = ({
  value
}) => esx`<div>
    <p> some content </p>
    <p> some ${value} </p>
  </div>`;

esx.register({
  Component
});

const App = () => esx`<Component ...${data}/>`;

export default App;


Installation

$ npm install babel-plugin-esx-ssr

Usage

.babelrc

{
  "plugins": ["esx-ssr"]
}

Via CLI

$ babel --plugins esx-ssr script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["esx-ssr"]
});

Requirements

This plugin is for esx v2.x.x.

Contributions

esx is an OPEN Open Source Project. This means that:

Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.

See the CONTRIBUTING.md file for more details.

Licence

MIT

FAQs

Package last updated on 30 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc