File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ export abstract class BundleBase {
1212 protected validateBundling ( ) : void {
1313 if ( this . $options . bundle ) {
1414 const bundlePluginName = this . bundlersMap [ this . $options . bundle ] ;
15- if ( ! bundlePluginName || ( ! this . $projectData . devDependencies [ bundlePluginName ] && ! this . $projectData . dependencies [ bundlePluginName ] ) ) {
15+ const hasBundlerPluginAsDependency = this . $projectData . dependencies && this . $projectData . dependencies [ bundlePluginName ] ;
16+ const hasBundlerPluginAsDevDependency = this . $projectData . devDependencies && this . $projectData . devDependencies [ bundlePluginName ] ;
17+ if ( ! bundlePluginName || ( ! hasBundlerPluginAsDependency && ! hasBundlerPluginAsDevDependency ) ) {
1618 this . $errors . fail ( "Passing --bundle requires a bundling plugin. No bundling plugin found or the specified bundling plugin is invalid." ) ;
1719 }
1820 }
You can’t perform that action at this time.
0 commit comments