agracio / edge-js

Run .NET and Node.js code in-process on Windows, macOS, and Linux
MIT License
618 stars 93 forks source link

Webpack: Cannot find module: edge_nativeclr #164

Closed harunrst closed 1 year ago

harunrst commented 1 year ago

Hey there, I have been trying to run this library on my webpack build typescript-node project. But I am getting this error for a while, I checked all other issues related to this but there is no specific solution. May I have some guidance here?

image

agracio commented 1 year ago

Please take a look at webpack packaging examples here: https://github.com/agracio/electron-edge-js/issues/39 You need to specify edge-js as external package similar to the code below:

  externals: {
    'edge-js': 'commonjs2 edge-js',
  },
  node: {
    __dirname: true,
    __filename: true,
  },
harunrst commented 1 year ago

thanks for the rapid response! it resolved my issue :)