简体   繁体   中英

Running javascript files with ES6 module imports in ASP.Net Core 2.x

I would like to execute a script with NodeServices from .Net Core, which imports ES6 modules.

I managed to execute the script using NodeJs with a --experimental-modules flag.

Is there any equivalent using NodeServices? Can my javascript file have import or dependencies from other scripts?

So did you try setting an Environment Variable when adding the service?

services.AddNodeServices((xx)=>
{
    xx.EnvironmentVariables
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM