Skip to content

Commit

Permalink
fix(rollup): make it not break when there are no peerDependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Kent C. Dodds committed Sep 8, 2017
1 parent 23395d2 commit 169ba3b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/config/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@ const isPreact = parseEnv('BUILD_PREACT', false)

const capitalize = s => s[0].toUpperCase() + s.slice(1)

const defaultGlobals = Object.keys(pkg.peerDependencies).reduce((deps, dep) => {
const defaultGlobals = Object.keys(
pkg.peerDependencies || {},
).reduce((deps, dep) => {
deps[dep] = capitalize(camelcase(dep))
return deps
}, {})

const defaultExternal = Object.keys(pkg.peerDependencies)
const defaultExternal = Object.keys(pkg.peerDependencies || {})

const filenameSuffix = parseEnv(
'BUILD_FILENAME_SUFFIX',
Expand Down

0 comments on commit 169ba3b

Please sign in to comment.