File tree 1 file changed +3
-1
lines changed
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 {
12
12
protected validateBundling ( ) : void {
13
13
if ( this . $options . bundle ) {
14
14
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 ) ) {
16
18
this . $errors . fail ( "Passing --bundle requires a bundling plugin. No bundling plugin found or the specified bundling plugin is invalid." ) ;
17
19
}
18
20
}
You can’t perform that action at this time.
0 commit comments