I am trying to put default and named export in same file. Example:
// file name : utils/fetch
export default fetchUtil;
module.exports = {
fetch : fetchUtil,
post,
put,
get,
};
// import code
import fetch from 'utils/fetch';
My code builds fine with webpack, however in browser I get errors :
fetchInit.js:27 Uncaught TypeError: (0 , _fetch2.default) is not a function
Am I missing something or is this not the way to do default & named import in the same file ?
export {a as default, b as c, d, e, f};
– Celom