cli: Importing ES2015 module throw syntax error

I’m submitting a bug report

  • Library Version: 0.21.1 (aurelia-cli)
  • Operating System: OSX 10.12.3
  • Node Version: 7.4.0
  • NPM Version: 4.0.5
  • Browser: all
  • Language: TypeScript 2.2.1

Current behavior: I have installed a library that’s coded using ES2015 syntax and when I’m requiring it inside the aurelia_project/aurelia.json esprima give me syntax error.

{ uid: 0,
  name: '<series>',
  branch: true,
  error:
   Error: Parse error using esprima for file: /Users/romainlanz/workspace/app.org/node_modules/myPackage/lib/index.js
   Error: Line 2: Unexpected token
  ....
}

Here’s the content of the file (TypeScript compiled to ES2015):

'use strict';
export * from './Auth';
export * from './Beach';
export * from './Requests';
export * from './Services';
export * from './Core';
//# sourceMappingURL=index.js.map

What is the expected behavior? I expect Aurelia to require my package without throwing an error.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 20 (14 by maintainers)

Most upvoted comments

@RomainLanz Is this issue resolved in version 0.30 of the CLI?