You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support package.json"exports" when resolving tstl.luaPlugins #1731
one package containing and exporting multiple plugins
in my case, i need to export plugin in specific route to export various other necessary features for the package user such as macro types, tsconfig files etc
package encapsulation (very common and quite necessary)
"exports" field is more modern and regarded feature than "main"
BTW, there was a workaround by adding like plugins.js file that routes/re-exports the exports of dist/plugins.js (which is the way of fallback for commonjs/legacy)
Oh seems like there was an issue which was written very long time ago but it looks like related but mentioned very poorly especially about the luaPlugins at its second problem. That issue seems mainly talking about module resolution to me rather focused especially on the tstl lua plugins. So i'm bit not sure is it actually duplicated.
Activity
Perryvw commentedon Jul 13, 2026
What does the plugin with exports mapping look like, and why does it need to use it? Why is the plugin not just resolvable by generic means?
jiwonz commentedon Jul 13, 2026
Sorry for missing/less informations. The package exports look like:
{ "exports": { "./plugins": { "types": "dist/plugins.d.ts", "default": "dist/plugins.js" } } }And i need to use
"exports"to achieve these:"exports"field is more modern and regarded feature than"main"BTW, there was a workaround by adding like
plugins.jsfile that routes/re-exports the exports ofdist/plugins.js(which is the way of fallback for commonjs/legacy)pilaoda commentedon Jul 20, 2026
Duplicated?
#1389
jiwonz commentedon Jul 20, 2026
Oh seems like there was an issue which was written very long time ago but it looks like related but mentioned very poorly especially about the luaPlugins at its second problem. That issue seems mainly talking about module resolution to me rather focused especially on the tstl lua plugins. So i'm bit not sure is it actually duplicated.