New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Babel for main process #139
Comments
Yes, if we don‘t use Babel, this is no way to share reducers between Main and Renderer. @chentsulin what do you think? |
I don't mind using babel also in main process, but which one approach is our best choice? |
The problem with using |
Actually, I guess we could use |
Code sharing is quite essential. Unfortunately, simple adding of
requiring the following
I've tried webpack'ing |
Is there a known workaround for this? @davej your solution seems reasonable, but I'm curious how you'd go about it within this boilerplate. |
@naderhen: it just worked for me. My entry point file looks like this: /* eslint strict: 0 */
'use strict';
require('babel-register');
require('./main/init.js');
|
I have something very similar which does indeed work in terms of running the electron application with babel included. However, when I attempt to package the app via Any thoughts? Do you run into the same issue when packaging? |
@naderhen: I haven't tried packaging the app yet. My plan was to use webpack and create an entry for the main js file. Have you tried using webpack to compile the main process files instead of including babel in your production build? |
hmm, yea @davej I've given the separate webpack entry route a shot but ended up with a slew of other cryptic errors either during the build or packaging process. If you come up with a working solution on your end I'd love to be pointed in the right direction. Willing to test out any other options you think would work too. |
Closed via #197. |
What's the consensus about letting the main process run through babel too? The issue I'm having is that I want to use
redux-electron-store
but I can't require any of the reducers because they use the ES6 module syntax which currently isn't supported by the latest versions of Electron/Chromium.The text was updated successfully, but these errors were encountered: