From 4bfd6c47a6bd0b0595e037abe617d4a94b2d052f Mon Sep 17 00:00:00 2001 From: Shuhel Ahmed Date: Fri, 18 Mar 2016 22:32:47 +0600 Subject: [PATCH] fix(feature): check extension. --- src/framework-configuration.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/framework-configuration.js b/src/framework-configuration.js index eee151be..6610ef37 100644 --- a/src/framework-configuration.js +++ b/src/framework-configuration.js @@ -176,7 +176,15 @@ export class FrameworkConfiguration { * @return Returns the current FrameworkConfiguration instance. */ feature(plugin: string, config?: any): FrameworkConfiguration { + if(hasExt(plugin)) { + return this.plugin({ moduleId: plugin, resourcesRelativeTo: [plugin, ''], config: config || {} }); + } + return this.plugin({ moduleId: plugin + '/index', resourcesRelativeTo: [plugin, ''], config: config || {} }); + + function hasExt(name) { + return (plugin.split('.')).length > 1; + } } /**