I am building a website using Aurelia within Visual Studio, it has the babel transpiler and my config file looks as follows
babelOptions: {
"optional": [
"optimisation.modules.system",
"es7.decorators",
"es7.classProperties",
"es7.asyncFunctions",
"runtime"
]
},
Visual Studio is reporting an error. Expected ';'
on line 4. However this seems to be the correct syntax, the app.js works, and I can browse to the app.html without any issues in the console. Here is the offending code.
export class App {
message = "Hello Aurelia";
configureRouter(config, router) { /// <--- Expected ';'
this.router = router;
config.title = 'Aurelia';
config.map([
{ route: ['', 'home'], name: 'home', moduleId: 'home/index' },
]);
};
};
If i try to use the more standard javascript lines
let configureRouter = function(config, router) {};
or
this.configureRouter = function(config, router) {};
Visual studio reports no issue, but Aurelia throws Error: (SystemJS) http://localhost:57366/src/app.js: Unexpected token (4:8)
in the console for both above.
Any idea how to get Visual Studio to be using the same intellisense as the babel transpiler is using? Or what the issue could be?