Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

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

Package Overview
Dependencies
Maintainers
7
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Esbuild plugin for remapping 'lib/' imports to 'src/'

latest
Source
npmnpm
Version
3.0.0
Version published
Maintainers
7
Created
Source

@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));

FAQs

Package last updated on 11 Sep 2024

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