Skip to content

Commit

Permalink
fix: don't warn for every src file in windows (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielroe authored Jul 8, 2021
1 parent 5004f80 commit e4d18aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/builder/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ export function getRollupOptions (ctx: BuildContext): RollupOptions {

external (id) {
const pkg = getpkg(id)
const isExplicitExternal = !!ctx.externals.find(extenrnal => pkg === extenrnal)
const isExplicitExternal = ctx.externals.includes(pkg)
if (isExplicitExternal) {
return true
}
if (ctx.inlineDependencies || id[0] === '.' || id[0] === '/' || id.includes('src/') || id.startsWith(ctx.pkg.name)) {
if (ctx.inlineDependencies || id[0] === '.' || id[0] === '/' || id.match(/src[\\/]/) || id.startsWith(ctx.pkg.name)) {
return false
}
if (!isExplicitExternal) {
Expand Down
2 changes: 1 addition & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { resolve } from 'path'
import { resolve } from 'upath'
import mri from 'mri'
import { build } from './build'

Expand Down

0 comments on commit e4d18aa

Please sign in to comment.