JSPM

esbuild-externals-plugin

1.3.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 103
  • Score
    100M100P100Q84928F
  • License MIT

Plugin for having a bit more convenience over externals.

Package Exports

  • esbuild-externals-plugin
  • esbuild-externals-plugin/package.json

Readme

esbuild-externals-plugin

A plugin for esbuild to have a bit more control and convenience over externals. Most notably, introducing an external such as rxjs will not imply externals such as rxjs/operators. Instead, the latter would still be bundled. This way, there are no surprises.

Usage

Install the plugin:

npm i esbuild-externals-plugin --save-dev

Now in your esbuild configuration file you can do:

const { build } = require('esbuild');
const { externalsPlugin } = require('esbuild-externals-plugin');

build({
  // ...
  plugins: [externalsPlugin(['@angular/common', '@angular/core'])],
});

License

This plugin is released using the MIT license. For more information see the LICENSE file.