A Rollup plugin that transforms local import/export paths in JavaScript/TypeScript bundles. Version 1.2.0 is the latest stable release, as a native addon supporting Windows, macOS, and Linux. It identifies local imports (starting with './' or '../') and applies a user-defined callback to modify the path, leaving external dependencies untouched. Unlike generic string replacement plugins, it uses AST-based detection to avoid false positives on non-import strings.
npm install rollup-plugin-local-importVerified import paths — ran on the pinned version, not inferred.
Basic Rollup config using localImport to add .js extensions to local imports.
Use a previous version or run on a supported system.
None needed; this is by design.
Ensure callback returns a modified string if transformation is intended.
Order plugins carefully in the Rollup config.
Use import { localImport } from 'rollup-plugin-local-import' instead of import localImport from ...Upgrade node or switch to a supported OS. See documentation for supported platforms.
Run 'npm install --save-dev rollup-plugin-local-import' or 'yarn add --dev rollup-plugin-local-import'