forge-externals-plugin
forge-externals-plugin copied to clipboard
node modules following github packages naming weren't included
Github Packages naming conventions are mapped wrongly by Electron-Forge Ignore function. Github Packages requires "@organization/package" name for libraries and Electron-Forge gives you just "node_modules/@organization". If you want to open an issue on their GitHub feel free to do so.
Also I would appreciate if you can merge & npm publish asap. Thanks.
It looks like this change would package everything under @org/ which could be including far too much.
Can you give me an example module that is currently failing to get packaged?
It looks like this change would package everything under
@org/which could be including far too much.Can you give me an example module that is currently failing to get packaged?
I tried with my own module which is private. But you can try yourself with any package which has "@org/package". I know that with my fix every "@org" package will be included. But the ignore function returns the package name wrong. Since I only have a single "@org" package I fixed that way, but the real issue is in Electron Forge API I guess?
Since I only have a single "@org" package I fixed that way, but the real issue is in Electron Forge API I guess?
The plan is to merge this functionality into forge so whatever the source of the issue I need to work out what's causing it so I can fix it.
Since I only have a single "@org" package I fixed that way, but the real issue is in Electron Forge API I guess?
The plan is to merge this functionality into forge so whatever the source of the issue I need to work out what's causing it so I can fix it.
Honestly it's the first time I've been working with Electron Forge and my package has a Native Node Addon (.node) which loads a dylib (or DLL depending on the OS). The only way I got it working was with this plugin and a small fix (the PR). If you have any better solution let me know.
The problem is really that electron-forge does not call the plugin with the correct package name. In case of a scoped package (@org) it's only providing /node_modules/@org, which is wrong. It should be providing /node_modules/@org/package-name. The plugin tries to process the dependencies of the externals so including a whole scope would not be ideal. Some dependencies could fail to be included.
Exactly what I needed. Thank you. This library and the changes proposed works great