Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

architect-examples/arc-proxy-plugin-jsx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ This repository has been archived. Use @proxy or asap for proxying in Architect. This plugin is not compatible with the plugins API for Architect. For an updated list other examples refer to arc.codes/examples.

@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']
  }
})

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •