luaPlugins tstl option with name field currently cannot resolve plugin packages that rely on package.json "exports" subpath mappings.
Example tsconfig:
{
"tstl": {
"luaPlugins": [
{
"name": "my-package/plugins"
}
]
}
}
This fails with a plugin resolution diagnostic like:
Could not resolve "my-package/plugins" plugin from "...".
However, the package is valid and works with Node resolution:
require("my-package/plugins")
I doubt because resolve library that currently tstl is using is old and unable to resolve the plugin package via package.json's "exports" properly
https://github.com/TypeScriptToLua/TypeScriptToLua/blob/master/src/transpilation/utils.ts#L54
resolved = resolve.sync(query, { basedir, extensions: [".js", ".ts", ".tsx"] });
luaPluginststl option withnamefield currently cannot resolve plugin packages that rely onpackage.json"exports"subpath mappings.Example tsconfig:
{ "tstl": { "luaPlugins": [ { "name": "my-package/plugins" } ] } }This fails with a plugin resolution diagnostic like:
However, the package is valid and works with Node resolution:
I doubt because
resolvelibrary that currently tstl is using is old and unable to resolve the plugin package viapackage.json's"exports"properlyhttps://github.com/TypeScriptToLua/TypeScriptToLua/blob/master/src/transpilation/utils.ts#L54