Registry / devops / rollup-plugin-local-resolve

rollup-plugin-local-resolve

JSON →
library1.0.7jsnpmunverified

Resolves Node-style directory imports (e.g., `./folder` to `./folder/index.js`) in Rollup. Version 1.0.7 is the latest stable release as of 2025, with no recent updates. It is a lightweight alternative to `rollup-plugin-node-resolve` for when you only need local index.js resolution without pulling in node_modules. Does not support async, absolute paths, or custom resolve extensions.

npm install rollup-plugin-local-resolve
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-LOCA
R
rollup-plugin-local-resolve
devopsjavascriptv1.0.7
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

localResolve
import localResolve from 'rollup-plugin-local-resolve'
import { localResolve } from 'rollup-plugin-local-resolve'
Default import; named export does not exist.

Basic setup: imports Rollup and the plugin, then passes localResolve as a plugin to enable resolving ./folder to ./folder/index.js.

import { rollup } from 'rollup'; import localResolve from 'rollup-plugin-local-resolve'; await rollup({ input: './src/index.js', plugins: [localResolve()] });
Debug
Known issues
gotchaPlugin only resolves paths relative to the current file; does not resolve node_modules.
fix
Use rollup-plugin-node-resolve if you need node_modules resolution.
affects: >=1.0.0
gotchaDoes not check for index.js asynchronously; may cause performance issues in large projects.
fix
No fix available; consider contributing async support or using an alternative.
affects: >=1.0.0
gotchaUses relative paths internally, inconsistent with Rollup's absolute path handling.
fix
Manually resolve paths to absolute if needed.
affects: >=1.0.0
gotchaDoes not support custom index file names or extensions (hardcoded to index.js).
fix
Use a different plugin like @rollup/plugin-node-resolve for customization.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module './my-folder' from '/path/to/file.js'
Rollup doesn't resolve directory imports by default. Folder './my-folder' exists but no plugin is configured.
fix
Add rollup-plugin-local-resolve to your Rollup plugins: `plugins: [localResolve()]`.
TypeError: (0 , _rollupPluginLocalResolve) is not a function
Wrong import style (named import instead of default import) in an ES module context.
fix
Use `import localResolve from 'rollup-plugin-local-resolve'` (default import).
Upgrade
Version history
1.0.7latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
2
Resources
rollup-plugin-local-resolve — npm install rollup-plugin-local-resolve · libregistry