Closed inzanez closed 1 year ago
Ok, I'll answer that myself. First of all, read the README even if you used the package already in another project. The following is important if used with rollup:
topLevelAwait({
// The export name of top-level await promise for each chunk module
promiseExportName: "__tla",
// The function to generate import names of top-level await promise in each chunk module
promiseImportName: i => `__tla_${i}`
})
And then, clear the browser cache. Seems I had a cache refreshing issue (even using ctrl + shift + r
which usually does the trick). All working very well.
I just managed to pack all things into an application compiled with
adapter-node
. However, I get the following error during runtime:The requested module '../chunks/types.c09c3db7.js' does not provide an export named '__tla'
. I guess that is the topLevelAwait export. Is there anything special that needs to be done to use that withadapter-node
? I used it with the static adapter which worked fine, but in this case I will have to go withnode
...