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

esbuild-plugin-import-assertions

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-import-assertions

A plugin for esbuild to enable import assertions

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

esbuild-plugin-import-assertions

The esbuild-plugin-import-assertions plugin import assertion behavior for esbuild.

Installation

This package is available on npm under the name esbuild-plugin-import-assertions and can be installed with npm, yarn or however else you consume dependencies.

Example commands:

npm:
npm i esbuild-plugin-import-assertions
yarn:
yarn add esbuild-plugin-import-assertions

Usage

To use the plugin you must use the JavaScript API for running esbuild. An example configuration is below

import { importAssertPlugin } from 'esbuild-plugin-import-assertions';
import { build } from 'esbuild';

build({
  entryPoints: ['./app.ts'],
  bundle: true,
  outfile: './lib/out.js',
  plugins: [importAssertPlugin],
  target: ['chrome100']
}).catch(() => process.exit(1))

A current limitation of the plugin is that you must set esbuild's bundle option to true. Likewise, asynchronous imports are not currently supported.

Keywords

FAQs

Package last updated on 02 Sep 2022

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