1.1.0 • Published 3 years ago

@fal-works/esbuild-plugin-regexp-externals v1.1.0

Weekly downloads
13
License
CC0-1.0
Repository
-
Last release
3 years ago

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.

1.1.0

3 years ago

1.0.0

3 years ago

0.1.0

3 years ago