1.0.0 • Published 5 years ago

@architect/proxy-plugin-jsx v1.0.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
5 years ago

@architect/proxy-plugin-jsx

Install

Ensure the plugin is installed in src/http/get-index.

cd src/http/get-index
npm i @architect/proxy-plugin-jsx

Usage

To transpile jsx into React.createElement calls:

// src/http/get-index/index.js
let arc = require('@architect/functions')

exports.handler = arc.proxy.spa({
  spa:true,
  plugins: {
    jsx: ['@architect/proxy-plugin-jsx/react']
  }
})

To transpile jsx into h calls:

// src/http/get-index/index.js
let arc = require('@architect/functions')

exports.handler = arc.proxy.spa({
  spa:true,
  plugins: {
    jsx: ['@architect/proxy-plugin-jsx/preact']
  }
})