From 6fd3f7fa7b92db3dea64be59fd390a2a4ae11d63 Mon Sep 17 00:00:00 2001 From: JeroenVinke Date: Sun, 16 Apr 2017 10:54:59 +0200 Subject: [PATCH] fix(project): only transpile aurelia_project in project root closes https://github.com/aurelia/cli/issues/605 --- lib/project.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/project.js b/lib/project.js index b20b0d301..d72010882 100644 --- a/lib/project.js +++ b/lib/project.js @@ -49,7 +49,7 @@ exports.Project = class { installTranspiler() { switch (this.model.transpiler.id) { case 'babel': - installBabel(); + installBabel.call(this); break; case 'typescript': installTypeScript(); @@ -201,7 +201,10 @@ function installBabel() { plugins: [ 'transform-es2015-modules-commonjs' ], - only: /aurelia_project/ + ignore: (filename) => { + let relativeFromProjectRoot = path.relative(this.directory, filename); + return !/^aurelia_project/.test(relativeFromProjectRoot); + } }); }