-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for ES Modules #151
Comments
Apologies for the slow response. I've added support for Word of caution - use of I will be releasing a version of the library with the addition some time this week. Edit: crashing is not an issue if you are consuming this library as a Nuget package. See #151 (comment). |
Amazing! Have you also experienced that crash issue when pointing to the |
TL;DRThe crashing was occurring for After some investigation, it turns out the crashing is not an issue if you are consuming this library as a Nuget package! DetailsSome background on how this library works - it starts a HTTP server in Node.js (server logic). It uses HTTP requests to send JS invocations to the Node.js process. When you call This library uses webpack to create a single server logic file. The crashing only occurs when the server logic is web-packed in development mode. In that mode, webpack uses The server logic is web-packed in development mode when the library is built in Debug mode. So if you clone this library and run tests in Debug mode (which is what I was doing), tests invoking from When the server logic is web-packed in production mode, eval is not used and so the crashing does not occur. For end-users consuming this library as a Nuget package, crashing is not an issue because the server logic is web-packed in production mode for the Nuget package. |
Hi, and thanks for a really awesome library - Really helps bridge the gap between Node and .NET.
Is it possible to add support for ES Modules/
.mjs
files?Currently, trying to execute code in
.mjs
files fail, with:It's executed using:
The whole Node system is slowly moving toward ES modules as the standard. In our case we're using Vite to bundle our server code, and it will by default output an
.mjs
file.The text was updated successfully, but these errors were encountered: