JavaScriptKit
JavaScriptKit copied to clipboard
Runtime portability improvements
as discussed in #477
This PR
- makes sure the Runtime remains compatible with "isolatedModules" (ie: esbuild, rollup, ...)
- move the JSBridge stubs out of the plugin template for better reusability
I think these changes are good even when the whole "how to best bundle/deploy/build/package" is not fully clear yet.
unfortunately this tsconfig setting "isolatedModules": true messes up the codegen for export const enum Kind
I reverted it for now, but maybe we should add CI checks for the Runtime "buildability" somehow?
I still do not want to expose the Runtime code as an API because maintaining a stable interface at that layer requires much effort.
@kateinoigakukun I understand the concern. I don't think this PR changes anything in that regard.