I have some functions and I want to keep them in an external js file. eg.
in functions.js
var double = function(x) {
return x + x;
}
export { double };
Then in my main js file:
import double from './functions';
...
double(2)
I get this error:
Uncaught TypeError: (0 , c.default) is not a function
at bundle.min.js:44
When I read the line 44:
(0, _functions2.default)(2);
Any ideas why? What have I missed?