一覧へ戻る
frostney/rollup-plugin-local-resolve(新しいタブで開きます)
主要言語: JavaScript
Resolves Node-style directories with `index.js` files in Rollup
- star 数
- 7
- watcher 数
- 1
- fork 数
- 6
- issue 数
- 5
- 最終更新
- 2023/07/29
主要言語: JavaScript
Resolves Node-style directories with `index.js` files in Rollup
Resolves Node-style directories with index.js files in Rollup
Rollup by default doesn't handle resolving ./folder to ./folder/index.js internally. While there is the rollup-plugin-node-resolve plugin which also resolves directories as well as all dependencies from the node_modules directory, these may sometimes be too much for the use case at hand.
npm install --save-dev rollup-plugin-local-resolve
import { rollup } from 'rollup'; import localResolve from 'rollup-plugin-local-resolve'; // This will resolve `./files` to `./files/index.js` if the file exists rollup({ entry: './files', plugins: [localResolve()], });
index.js file asynchronouslyMIT, see LICENSE for more information