2.0.0 • Published 1 year ago

@rnx-kit/esbuild-plugin-import-path-remapper v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@rnx-kit/esbuild-plugin-import-path-remapper

Build npm version

@rnx-kit/esbuild-plugin-import-path-remapper remaps **/lib/** imports to **/src/**. This is useful for packages that are not correctly exporting everything via their index.ts, but you still want to consume the TypeScript files rather than the transpiled JavaScript.

Usage

Add @rnx-kit/esbuild-plugin-import-path-remapper to your build script plugins. The package name filter argument to the plugin is an esbuild compatible regular expression to match the packages to transform.

For example, to remap all paths under the @rnx-kit scope:

// esbuild.js
const ImportPathRemapperPlugin = require("@rnx-kit/esbuild-plugin-import-path-remapper");

require("esbuild")
  .build({
    entryPoints: ["app.tsx"],
    bundle: true,
    outfile: "out.js",
    plugins: [ImportPathRemapperPlugin("@rnx-kit")],
  })
  .catch(() => process.exit(1));
2.0.0

1 year ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.1

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago