Unexpected token import when including node packages in js

I have installed alasql using package.json but I am unable to run import alasql from "alasql". I am getting

Uncaught SyntaxError: Unexpected token import

Does it make any difference that I am in an umbrella project?

Still unable to achieve this with brunch. Stuck and can’t use lodash in my project.

did you include babel-preset-es2015?
Install this module and include in brunch-config.js plugins: babel: {presets: ["es2015"]}

1 Like