Socket
Socket
Sign inDemoInstall

arc-plugin-esbuild

Package Overview
Dependencies
60
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    arc-plugin-esbuild

Use Typescript and esbuild with arc.codes!


Version published
Weekly downloads
9
increased by80%
Maintainers
1
Install size
3.22 MB
Created
Weekly downloads
 

Readme

Source

arc-plugin-esbuild

Bundles arc functions with esbuild, includes dependencies and tree shakes!

Arc serverless framework plugin for compiling your functions with ESBuild Bundler

Install

npm i --save-dev arc-plugin-esbuild

Usage

After installing add @plugins and @esbuild pragmas to your app.arc file:

app.arc

@app
myapp

@aws
runtime esbuild

@http
get /

@plugins
arc-plugin-esbuild

Options

This plugin supports the following options under the @esbuild pragma:

OptionDescriptionExample
buildDirectoryThe directory to write the bundled files to. This directory will be used at deploy-time before bundling your functions for deployment. Defaults to .esbuild. If you use hydration it's recommended to set this to src and commingle your js and ts.buildDirectory .esbuild
externalesbuild package externals defaults to aws-sdk passed directly to esbuildexternal '@prisma/client' aws-sdk
baseRuntimeThe lambda runtime we should target. Defaults to nodejs16.xbaseRuntime nodejs14.x
configFileA config file that is passed to esbuild. This allows for esbuild plugins. It should be a commonjs .js file as it will be required(). You can override everything so be careful. See our source for existing build options.configFile .esbuildrc.js

Hydration

Custom runtimes do not support any shared code or hydration.

Sample Application

There is a sample application located under sample-app/. cd into that directory, npm install and you can run locally via arc sandbox or deploy to the internet via arc deploy.

Keywords

FAQs

Last updated on 21 Aug 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc