As await
can only be used inside an async function, the code below does not work.
const config_path = 'https://test.cdn.com/conf.' + location.hash.include('DEV')?'development.ts':'production.ts'
const promise = import(config_path)
export default config = await promise
So is there any way to export promise's result in es/ts module?