Closed debelop13 closed 6 years ago
In "ember electron:assemble" option, when the project is built, symlinks are dereferenced.
We use broccoli to assemble the application, and it doesn't support symlinks. What's your use case? Where/why do you have symlinks in your app?
I have frameworks and other things in resources.. and they have symlinks, and the size increase a lot, and one framework is not working after the built
Supporting symlinks isn't really a use case we've been thinking about...it will take some thought/time to figure out how to best support them. As a workaround, I would recommend that you remove these resources from the ember-electron
directory and put them somewhere else, and then use electron-forge
's new hooks feature to copy what you need over yourself in the generateAssets
hook.
I understand idea but I don't know how do it.
function prepackage() {
console.log('prepackage');
}
function premake() {
console.log('premake');
}
module.exports = {
'make_targets': {
'darwin': [
'dmg'
],
'win32': [
'squirrel'
]
},
postPackage: prepackage(),
preMake: premake(),
...
I am doing this, but is executing both before packaging!
It exists any example?
You want it to happen before packaging. Here's the sequence of events:
ember-electron
builds the Ember app and then assembles an Electron app that is compatible with electron-forge
by copying files out of the ember-electron
directory (this is the step where we can't really avoid deref'ing symlinks)ember-electron
calls into electron-forge
to tell it to package the applicationelectron-forge
calls into electron-packager
telling it to package the applicationelectron-forge
calls the generateAssets
hook just before calling into electron-packager
as you can see here, so if you copy your content and create your symlinks and whatnot in that hook, and electron-packager
is properly configured to not deref symlinks, then it should work.
You could try running DEBUG=electron-forge:packager ember electron:package
to double check that this line shows that your option is making it through the various layers to electron-packager
correctly.
I'm assuming the workaround worked for you, so I'm closing this unless somebody has a broader case for us figuring out how to support symlinks.
Hi! Now with the compilation of my app the symlinks are being deleting, and is increasing the size a lot. But option of "derefSymlinks: false" is deleting symlinks anyway. Can be?
Thanks!