Webpack builds successfully and I can browse to my webpage. However, the Javascript fails, saying: \'import declarations may only appear at top level of a module\'
B
I had the same problem. You installed ES6. The import fails w/o it.
Babel file is copied without being transformed
EDIT:
By default, Babel 6.x does not perform any transformations. You need to tell it what transformations to run:
npm install babel-preset-es2015
and run
babel --presets es2015 proxy.js --out-file proxified.js
or create a .babelrc file containing
{
"presets": [
"es2015"
]
}