isaacs/rimraf

Circular dependency warnings with Rollup

brc-dd opened this issue · 1 comments

Hi, when trying to bundle rimraf using Rollup or similar tools, there are warnings like these:

(!) Circular dependency
node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/mjs/index.js -> node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/mjs/opt-arg.js -> node_modules/.pnpm/rimraf@5.0.1/node_modules/rimraf/dist/mjs/index.js

This happens because of these imports (opt-arg imports things from index and index imports opt-args):

rimraf/src/opt-arg.ts

Lines 2 to 7 in bfda548

import {
assertRimrafOptions,
RimrafAsyncOptions,
RimrafOptions,
RimrafSyncOptions,
} from './index.js'

Haven't got any issue with this so far, but I wonder if it would be better to move the common stuff to other file?

Bump