export Worker from './class/Worker'
^
SyntaxError: Invalid or unexpected token
at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
the below is ok:
import Worker from './class/Worker'
export { Worker }
hey @cpu100 the syntax you are referring to doesn't exist (yet). there's a proposal for adding it to the language: https://github.com/tc39/proposal-export-default-from , but it seems to be a bit stale right now.
what you can do currently:
// if you want to re-export as default:
export { default } from './class/Worker'
// if you want to re-export as named:
export { default as Worker } from './class/Worker'
got it, thank you for explaining.
Most helpful comment
hey @cpu100 the syntax you are referring to doesn't exist (yet). there's a proposal for adding it to the language: https://github.com/tc39/proposal-export-default-from , but it seems to be a bit stale right now.
what you can do currently: