electron-webapps / meteor-electron

Meteor Electron, the easiest way to create a desktop Meteor application
MIT License
326 stars 48 forks source link

Split meson:electron into 2 parts to eliminate dev dependencies from build #84

Open rdickert opened 8 years ago

rdickert commented 8 years ago

We are having trouble building our Meteor app on production the meson:electron. We are getting this error:

Errors prevented bundling:
While linking the program:
error: meson:electron is not compatible with architecture 'os.linux.x86_64'".  

The issue is that the webservers are linux so the build command is meteor build --architecture os.linux.x86_64 latestBuild.

It seems likely that it is the electron build tools that are causing this. What if we split meson:electron into two parts:

  1. App: Includes client/index.js, the app dir, and app update server logic (routing etc.). Build in all environments.
  2. Dev tools: Includes Electron build infrastructure and reload code. Use the debugOnly flag so it doesn't build in production. For people with unusual build situations, they could also choose to remove the dev package manually.

This would decouple dev environments from deployment. Alternatively, is there a solution to this without any changes to the package?