Results 828 comments of

I guess this happens because [`WEAK=true` calls `napi_unref_threadsafe_function`](https://github.com/napi-rs/napi-rs/blob/a54b759bb1767d0b45968ea4acf795de78af268a/crates/napi/src/threadsafe_function.rs#L295-L301) but the docs says it doesn't allow to call it from non-main thread. https://nodejs.org/api/n-api.html#napi_unref_threadsafe_function:~:text=is%20also%20idempotent.-,This%20API%20may%20only%20be%20called%20from%20the%20main%20thread.,-Miscellaneous%20utilities

This is the code I wanted to write but reverted before I made this PR due to compile errors: https://github.com/rolldown/rolldown/pull/985/commits/76f912b6db1b65a46708b1f3fa3e8c139a558527

`resolveImportMeta` (and `resolveFileUrl`) runs after the chunk generation and before the chunk is transformed into other formats (e.g. CJS, SystemJS). There are cases where it's not easily possible to achieve...

Hmm, maybe adding an option that tells rollup to stop transforming `import.meta` even when outputting in other formats would make `resolveImportMeta` hook to be replaced with `renderChunk` hook.

Ah, no, that will make it impossible to know both `moduleId` and `chunkId` at the same time. You can only know the `chunkId` in `renderChunk` and `moduleId` in `transform`. Well,...

This might only be worth in some cases. results with rome: - without ![image](https://github.com/rolldown/rolldown/assets/49056869/4af1ed50-0870-4435-848a-bd3e62e122fb) - with ![image](https://github.com/rolldown/rolldown/assets/49056869/b40642b8-b82f-4c43-b3ab-565132f82add)

Closing as the link is fixed.

You have `experimentalDecorators` enabled and your code is not valid for the experimental decorators syntax. It does error with [TS playground](https://www.typescriptlang.org/play/?experimentalDecorators=true&isolatedModules=true&verbatimModuleSyntax=true#code/GYVwdgxgLglg9mABAZSgQygUwDwBUAWMAzgDSIBKmUIATmAHwAUAUIoujQOZUBciAwgBs0RIgEEIETKLg0AIpgiyMs3Gi5U8hUhSq0GJVogD6SsFgAeUPkJHjJ0orIVKaKmvwSWoW4mUrUdPTMAJSIAN5GZkRQiDTSIILWAsKiElIy8orKULKURIk+BH66gQyIALwRRmzcUIxQ2nzFRGGRbB1xenTs6nUAdAMQaIKCDdohANw1iAC+hp1EVIyYfGhgAJ5tM2wA9LuI0XCCmP2CcJwrITu9GlD9S-fDo+MlmFMz80az00bxZV0CklprNmMwIKkiIgAOLnABGI1Qskw1TY0SgNBA0FkjDaoKMAAFUBhMEY0A5MogQEs6GgALYoqoAciwMSZvzYjwAqjSwPTMIwACYYNB8GI0GBgTghPgANzgMEFqI6jWI-WpmFpDMqiGF6GmbHxtSoPM1fIZuLFGMlnGVbH++nY2nVvP5BrmzFBQA). Note that `experimentalDecorators` is disabled by default on TS...

Since we now have `?url&inline`, you can convert it into ArrayBuffers with a function like this: ```js function dataUrlToArrayBuffer(dataUrl) { const base64StartIndex = dataUrl.indexOf('base64,'); if (base64StartIndex >= 0) { const...

For those who are interested in having this a built-in support, it would be helpful if you described your expected usage of it. We are not sure how the API...