fix(routes): remove + for non-lazy routes import (#499)

* fix(routes): remove `+` for non-lazy routes import

- prepend `+` only for lazy routes' import path directories
This commit is contained in:
Ionut Achim 2016-04-22 16:12:54 +03:00 committed by Filipe Silva
parent e573295d1b
commit 555f1844bc

View File

@ -115,7 +115,7 @@ module.exports = {
// Insert the import statement.
let content = fs.readFileSync(parentFile, 'utf-8');
const importTemplate = `import {${jsComponentName}Component} from './+${base}';`;
const importTemplate = `import {${jsComponentName}Component} from './${options.isLazyRoute ? '+' : ''}${base}';`;
if (content.indexOf(importTemplate) != -1) {
// Already there, do nothing.