Hello,
When compiling the module as AOT module then the resulting js module loaders is incorrect because:
import dotnet from 'node-api-dotnet/net10.0';
should have been:
const dotnet = undefined;
Poking around in the source code the problem is in NodeApi.targets which does:
<Task>
<Using Namespace="System.IO" />
<Code Type="Fragment" Language="cs">
<![CDATA[
string js = File.ReadAllText(TargetFile);
js = js.Replace("const dotnet = require('node-api-dotnet');", "const dotnet = undefined;");
js = js.Replace("import dotnet from 'node-api-dotnet';", "const dotnet = undefined;");
if (!IncludeRidSubpath) js = js.Replace("rid, ", "");
File.WriteAllText(TargetFile, js);
]]>
</Code>
</Task>
but it should now replace "node-api-dotnet/netX.X" instead of just "node-api-dotnet"
Thanks!
Hello,
When compiling the module as AOT module then the resulting js module loaders is incorrect because:
import dotnet from 'node-api-dotnet/net10.0';should have been:
const dotnet = undefined;Poking around in the source code the problem is in
NodeApi.targetswhich does:but it should now replace "node-api-dotnet/netX.X" instead of just "node-api-dotnet"
Thanks!