Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
Correctly bundle dependencies if there is only one
Browse files Browse the repository at this point in the history
Fixes #8
  • Loading branch information
meganwalker-ibm authored and spalger committed Feb 8, 2018
1 parent 3587e82 commit f04de75
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/kbn-plugin-helpers/tasks/build/build_action.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,15 @@ module.exports = function (plugin) {
var files = [
'package.json',
'index.js',
'{lib,public,server,webpackShims}/**/*',
`node_modules/{${ deps.join(',') }}/**/*`,
'{lib,public,server,webpackShims}/**/*'
];

if (deps.length === 1) {
files.push(`node_modules/${ deps[0] }/**/*`);
} else {
files.push(`node_modules/{${ deps.join(',') }}/**/*`);
}

vfs
.src(files, { base: plugin.root })
.pipe(rename(function nestFileInDir(path) {
Expand Down

0 comments on commit f04de75

Please sign in to comment.