Skip to content

Commit 6fd3f7f

Browse files
committed
fix(project): only transpile aurelia_project in project root
closes #605
1 parent 55e487d commit 6fd3f7f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/project.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ exports.Project = class {
4949
installTranspiler() {
5050
switch (this.model.transpiler.id) {
5151
case 'babel':
52-
installBabel();
52+
installBabel.call(this);
5353
break;
5454
case 'typescript':
5555
installTypeScript();
@@ -201,7 +201,10 @@ function installBabel() {
201201
plugins: [
202202
'transform-es2015-modules-commonjs'
203203
],
204-
only: /aurelia_project/
204+
ignore: (filename) => {
205+
let relativeFromProjectRoot = path.relative(this.directory, filename);
206+
return !/^aurelia_project/.test(relativeFromProjectRoot);
207+
}
205208
});
206209
}
207210

0 commit comments

Comments
 (0)