Skip to content

Commit

Permalink
fix getExternal parms
Browse files Browse the repository at this point in the history
  • Loading branch information
jalal committed Feb 4, 2020
1 parent 705c97e commit 4d3165a
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/config/input/getInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const getPlugins = require("./getInputPlugins");
*
* @returns {function} - function resolver
*/
function getExternal({ peerDependencies, dependencies }, BUILD_FORMAT) {
function getExternal({ peerDependencies, dependencies, BUILD_FORMAT }) {
const external = [];

/**
Expand Down Expand Up @@ -47,12 +47,21 @@ function getExternal({ peerDependencies, dependencies }, BUILD_FORMAT) {
*
* @returns {Object} contains input option for the package.
*/
function genInput({ sourcePath, presets, flags, ...advancedOpt }) {
const external = getExternal();
function genInput({
flags: { IS_SILENT, BUILD_FORMAT, BABEL_ENV },
peerDependencies,
dependencies,
sourcePath,
presets,
...advancedOpt
}) {
const external = getExternal({
peerDependencies,
dependencies,
BUILD_FORMAT
});

const { IS_SILENT, BUILD_FORMAT, BABEL_ENV } = flags;

const plugins = getPlugins(presets, IS_SILENT, BUILD_FORMAT, BABEL_ENV);
const plugins = getPlugins({ presets, IS_SILENT, BUILD_FORMAT, BABEL_ENV });

return {
input: sourcePath,
Expand Down

0 comments on commit 4d3165a

Please sign in to comment.