@fal-works/esbuild-plugin-regexp-externals
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

esbuild-plugin-regexp-externals

A tiny esbuild plugin for specifying external modules with regular expressions.

Developed with: esbuild v0.8.39

Install

npm install -D @fal-works/esbuild-plugin-regexp-externals

Usage example

import { regexpExternals } from "@fal-works/esbuild-plugin-regexp-externals";

esbuild.build({
  bundle: true,
  entryPoints: ["src/main.js"],
  outfile: "dist/bundle.js",
  plugins: [regexpExternals(/^[^.]/)],
});

In this example any module paths that don't start with a dot will be marked as external.

Allowed expressions

See docs of esbuild plugins:

The allowed regular expression syntax is the syntax supported by Go's regular expression engine. This is slightly different than JavaScript. Specifically, look-ahead, look-behind, and backreferences are not supported.

Readme

Keywords

Package Sidebar

Install

npm i @fal-works/esbuild-plugin-regexp-externals

Weekly Downloads

1

Version

1.1.0

License

CC0-1.0

Unpacked Size

10.9 kB

Total Files

8

Last publish

Collaborators

  • fal-works