0
votes

I am getting up to speed with Aurelia.

I have a project set up and running based on the skeleton navigation project.

It starts up, and then tries to load welcome.js and then errors out.

It errors out on this line:

heading = 'Welcome';

If I change the line of code to

heading : 'Welcome';

Then it works.

So somehow, the ES6 classes do not seem to be loaded properly by babel.

How do I resolve this?

1

1 Answers

2
votes

Check your build\babel-options.js file. It should look like this:

module.exports = {
  modules: 'system',
  moduleIds: false,
  comments: false,
  compact: false,
  stage:2,
  optional: [
    "es7.decorators",
    "es7.classProperties"
  ]
};

The es7.classProperties line is the important one in your case.