Skip to content

Commit

Permalink
Only include specified formats
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpalmer committed Jan 30, 2019
1 parent acea30c commit 18b6212
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,16 @@ async function getInputs(entries, source) {
function createBuildConfigs(opts) {
return concatAllArray(
opts.input.map(input => [
createRollupConfig('cjs', 'development', { ...opts, input }),
createRollupConfig('cjs', 'production', { ...opts, input }),
createRollupConfig('es', 'production', { ...opts, input }),
createRollupConfig('umd', 'development', { ...opts, input }),
createRollupConfig('umd', 'production', { ...opts, input }),
opts.format.includes('cjs') &&
createRollupConfig('cjs', 'development', { ...opts, input }),
opts.format.includes('cjs') &&
createRollupConfig('cjs', 'production', { ...opts, input }),
opts.format.includes('es') &&
createRollupConfig('es', 'production', { ...opts, input }),
opts.format.includes('umd') &&
createRollupConfig('umd', 'development', { ...opts, input }),
opts.format.includes('umd') &&
createRollupConfig('umd', 'production', { ...opts, input }),
])
);
}
Expand Down

0 comments on commit 18b6212

Please sign in to comment.