Skip to content
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

fix(getPAL): use browser-pal for electron-renderer #100

Merged
merged 1 commit into from
Apr 7, 2017
Merged

fix(getPAL): use browser-pal for electron-renderer #100

merged 1 commit into from
Apr 7, 2017

Conversation

MeirionHughes
Copy link
Contributor

No description provided.

@niieani
Copy link
Contributor

niieani commented Apr 6, 2017

It might make sense to also use urelia-pal-nodejs for electron renderer (it should also work).

@jods4
Copy link
Contributor

jods4 commented Apr 6, 2017

I was suggested as reviewer but honestly guys I have no idea about electron stuff.
I'm wondering if aurelia-pal-browser shouldn't be the default, though....

I'm not using Electron at all, so if someone with more experience tells me it's the good choice, then let's merge.

@MeirionHughes
Copy link
Contributor Author

MeirionHughes commented Apr 6, 2017

the renderer thread is chromium; I don't see why you'd want to use pal-nodejs within what is effectively chrome. A good reason for using pal-browser is you get full SVG support.

@MeirionHughes
Copy link
Contributor Author

here is working repo btw: https://github.com/MeirionHughes/aurelia-webpack-electron its working flawlessly so far. I noticed you can override the pal via the opts (better late than never).

@niieani
Copy link
Contributor

niieani commented Apr 7, 2017

@MeirionHughes

I don't see why you'd want to use pal-nodejs within what is effectively chrome

You can use pal-nodejs in Electron to effectively skip any build/compilation steps. Since Electron is Node + Chromium, you get the best of both worlds. This way you can use Aurelia from pure JavaScript or pure TypeScript (if you use something like ts-node/register or even ESNext when using babel-register). NodeJS effectively becomes the loader and no bundling is necessary. Of course, HMR won't work this way at the moment (it would need a plugin which watches files for changes), but it should be possible in the future.

@MeirionHughes
Copy link
Contributor Author

You can use pal-nodejs in Electron to effectively skip any build/compilation steps.

would that not imply you are not using this webpack plugin?

@niieani
Copy link
Contributor

niieani commented Apr 7, 2017

@MeirionHughes ah, yes! Forgot we're in the webpack-plugin context. So in that case, this PR totally makes sense. Let's merge it!

@niieani niieani merged commit 81be905 into aurelia:master Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants