Skip to content

Commit de582b4

Browse files
Copilotanubra266
andcommitted
Fix dist/index check to support all file extensions
Co-authored-by: anubra266 <[email protected]>
1 parent cea9081 commit de582b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const createRule = ESLintUtils.RuleCreator(
1313
export type Rule = ReturnType<typeof createRule>
1414

1515
// Determine the distribution directory
16-
const isBase = process.env.NODE_ENV !== 'test' || import.meta.url.endsWith('dist/index.js')
16+
const isBase = process.env.NODE_ENV !== 'test' || import.meta.url.includes('/dist/index')
1717
export const distDir = fileURLToPath(new URL(isBase ? './' : '../../dist', import.meta.url))
1818

1919
// Create synchronous function using synckit

0 commit comments

Comments
 (0)