{"library":"rollup-plugin-rename-node-modules","title":"rollup-plugin-rename-node-modules","description":"A Rollup plugin that renames the `node_modules` directory in the output when bundling with `preserveModules` and also rewrites relative imports to point to the new folder. Version 1.3.1 is the latest stable release. It addresses a common npm publishing issue where npm ignores `node_modules` in the output directory. Supports a custom replacer function (since 1.3.0), optional source map generation (since 1.2.0), and requires Rollup 2.28.2+ and Node 8+. This is a niche utility for library authors bundling dependencies with `preserveModules`.","language":"javascript","status":"active","last_verified":"Mon Apr 27","install":{"commands":["npm install rollup-plugin-rename-node-modules"],"cli":null},"imports":["import renameNodeModules from 'rollup-plugin-rename-node-modules'","plugins: [renameNodeModules('ext', false)]","import renameNodeModules from 'rollup-plugin-rename-node-modules'"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import renameNodeModules from 'rollup-plugin-rename-node-modules';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    dir: 'dist',\n    format: 'cjs',\n    preserveModules: true,\n  },\n  plugins: [renameNodeModules('external_modules')],\n};","lang":"typescript","description":"Basic Rollup config using the plugin with a custom folder name to avoid npm's node_modules ignore behavior.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}