{"id":22119,"library":"rollup-plugin-local-resolve","title":"rollup-plugin-local-resolve","description":"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.","status":"active","version":"1.0.7","language":"javascript","source_language":"en","source_url":"https://github.com/frostney/rollup-plugin-local-resolve","tags":["javascript","rollup","rollup-plugin","resolve","folder","index"],"install":[{"cmd":"npm install rollup-plugin-local-resolve","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-local-resolve","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-local-resolve","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Default import; named export does not exist.","wrong":"import { localResolve } from 'rollup-plugin-local-resolve'","symbol":"localResolve","correct":"import localResolve from 'rollup-plugin-local-resolve'"}],"quickstart":{"code":"import { rollup } from 'rollup';\nimport localResolve from 'rollup-plugin-local-resolve';\n\nawait rollup({\n  input: './src/index.js',\n  plugins: [localResolve()]\n});","lang":"javascript","description":"Basic setup: imports Rollup and the plugin, then passes localResolve as a plugin to enable resolving ./folder to ./folder/index.js."},"warnings":[{"fix":"Use rollup-plugin-node-resolve if you need node_modules resolution.","message":"Plugin only resolves paths relative to the current file; does not resolve node_modules.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"No fix available; consider contributing async support or using an alternative.","message":"Does not check for index.js asynchronously; may cause performance issues in large projects.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Manually resolve paths to absolute if needed.","message":"Uses relative paths internally, inconsistent with Rollup's absolute path handling.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use a different plugin like @rollup/plugin-node-resolve for customization.","message":"Does not support custom index file names or extensions (hardcoded to index.js).","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Add rollup-plugin-local-resolve to your Rollup plugins: `plugins: [localResolve()]`.","cause":"Rollup doesn't resolve directory imports by default. Folder './my-folder' exists but no plugin is configured.","error":"Error: Cannot find module './my-folder' from '/path/to/file.js'"},{"fix":"Use `import localResolve from 'rollup-plugin-local-resolve'` (default import).","cause":"Wrong import style (named import instead of default import) in an ES module context.","error":"TypeError: (0 , _rollupPluginLocalResolve) is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}