bennymeg / nx-electron

Electron schematics for nrwl nx platform
Apache License 2.0
333 stars 85 forks source link

Worker threads #108

Closed publicvirtualvoid closed 3 years ago

publicvirtualvoid commented 3 years ago

I would like to use worker threads in my electron application. To have this work through Webpack, I need to define additional entrypoints.

It seems there is a PR to do this in NX Node that adds configuration options for this in the schema: https://github.com/nrwl/nx/pull/5741/files

Would a similar solution be required to make this work in nx-electron, or is there an easier way?

publicvirtualvoid commented 3 years ago

I ended up doing this by creating a second dummy NodeJS library that builds the worker into the same directory. It's a bit of a hack but it works for now.