Skip to content

Commit 1bc54c1

Browse files
committed
Fix "Entry module cannot be external" error
1 parent 16d6c28 commit 1bc54c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

source/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ function nodeExternals(options: ExternalsOptions = {}): Plugin {
130130
let include: RegExp[],
131131
exclude: RegExp[]
132132

133-
const isIncluded = (id: string) => include.length === 0 || include.some(rx => rx.test(id)),
134-
isExcluded = (id: string) => exclude.length > 0 && exclude.some(rx => rx.test(id))
133+
const isIncluded = (id: string) => include.some(rx => rx.test(id)),
134+
isExcluded = (id: string) => exclude.some(rx => rx.test(id))
135135

136136
return {
137137
name: 'node-externals',

0 commit comments

Comments
 (0)