rollup-plugin-resolve

raw JSON →
0.0.1-predev.1 verified Mon Apr 27 auth: no javascript deprecated

A rollup plugin that wraps the Node.js resolution algorithm for module resolution. Currently at version 0.0.1-predev.1, this package is in pre-release state with no stable releases. It serves as a resolver for Rollup, similar to @rollup/plugin-node-resolve but with no documentation or usage guidance. Not recommended for production use due to its early stage.

error Error: Cannot find module 'rollup-plugin-resolve'
cause Package not installed or not published to npm correctly.
fix
Run 'npm install rollup-plugin-resolve@0.0.1-predev.1' and verify node_modules.
error TypeError: resolve is not a function
cause Named import used instead of default import.
fix
Change import to 'import resolve from 'rollup-plugin-resolve''.
deprecated This package is in pre-release (0.0.1-predev.1) and lacks documentation. Consider using @rollup/plugin-node-resolve instead.
fix Replace with 'npm install @rollup/plugin-node-resolve' and update import.
gotcha Default export is a function, not a plugin instance. Must call it with options to get a plugin object.
fix Use resolve() (with parentheses) in plugins array, not resolve alone.
breaking No stable version exists; API may change without notice.
fix Pin to a specific version or migrate to a maintained plugin.
npm install rollup-plugin-resolve
yarn add rollup-plugin-resolve
pnpm add rollup-plugin-resolve

Configures Rollup to use the resolve plugin for module resolution, excluding Node built-ins.

import resolve from 'rollup-plugin-resolve';
import builtins from 'builtin-modules';
export default {
  input: 'src/main.js',
  output: { file: 'bundle.js', format: 'esm' },
  plugins: [resolve({
    builtins: false,
    customResolveOptions: { moduleDirectory: ['node_modules'] }
  })]
};