Socket
Book a DemoInstallSign in
Socket

@wanews/nx-esbuild

Package Overview
Dependencies
Maintainers
5
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wanews/nx-esbuild

NX Plugin to build your node apps using ESBuild and can serve it by watching the bundle with nodemon

1.2.0
latest
Source
npmnpm
Version published
Weekly downloads
1.3K
-43.11%
Maintainers
5
Weekly downloads
 
Created
Source

nx-esbuild

NX Plugin to build your node apps using ESBuild and can serve it by watching the bundle with nodemon

Generators

node

Creates a new node application.

  • dependencies in package.json will automatically get marked as externals

Executors

build

Bundles your node application

Options

The available options are listed in libs/nx-esbuild/src/executors/build/schema.json

See https://esbuild.github.io/api/#simple-options for more info on the available options

package

Primarily designed when bundling lambdas, it will ensure node_modules is installed into dist for each entrypoint, then zips the output folder (ready to be uploaded to AWS)

NOTE: Currently only supports pnpm

Externals & node_modules

If you create a package.json next to the entrypoint, it will be used instead of the project package.json. This is useful when you have a specific lambda have less dependencies installed than the project has. Externals will only ever use the root package.json (so it should always be a superset of the lambda entrypoint package.json)

beforeZip hook

If there is additional preparation you need to do before zipping, you can use the beforeZip hook. It will be run with a CWD of the output folder.

Options

The available options are listed in libs/nx-esbuild/src/executors/build/schema.json

See https://esbuild.github.io/api/#simple-options for more info on the available options

serve

Bundles your node application in watch mode, then starts nodemon to watch the bundle

Options

The available options are listed in llibs/nx-esbuild/src/executors/serve/schema.json

See https://esbuild.github.io/api/#simple-options for more info on the available options

An option is missing

I have just added the options I needed to start with, to add another just

  • Add the option to the schema.json file
  • Add the option to the schema.d.ts file
  • Consume the option in executor.ts and pass the appropriate cli arg

FAQs

Package last updated on 10 Jul 2024

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.