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

Repeated builds will generate larger app? #110

Closed
adam-lynch opened this issue Nov 14, 2014 · 6 comments · May be fixed by donkeycode/nw-builder#12
Closed

Repeated builds will generate larger app? #110

adam-lynch opened this issue Nov 14, 2014 · 6 comments · May be fixed by donkeycode/nw-builder#12

Comments

@adam-lynch
Copy link
Contributor

I.e. if you build (let's say with a gulpfile), you might get a 100 KB .exe, then run it again, you'll get 130 KB (or something like that) and so on.

Not sure why this happens. Maybe it's concatenating them somehow or something.

Should we clean the destination before doing anything?

@steffenmllr
Copy link
Contributor

If this only on windows? I can't see any difference in size on mac. Havn't looked the the code for a while but it should copy from the cache folder a fresh copy into the release folder:
https://github.com/mllrsohn/node-webkit-builder/blob/master/lib/index.js#L317-L329

@adam-lynch
Copy link
Contributor Author

Not sure. It was on Windows 8.1 that I noticed.

@adam-lynch adam-lynch changed the title Repeated builds will generate larger app Repeated builds will generate larger app? Nov 25, 2014
@chimon2000
Copy link

I ran into an issue, what it ended up being is that the way I was calling nwbuild, it was targeting not only my source, but my old build and all of my node modules, turning what was a 50mb app into a 170mb app.

Each time I built the size of the app was doubling because it would recopy the old build into the new one.

I changed my nwbuild target to a src folder that included only my source files and a package.json specific to nw. That resolved my issues.

@1j01
Copy link
Contributor

1j01 commented May 1, 2015

The build folder and cache folder should be automatically excluded when building, as well as any devDependencies
That way you wouldn't have to maintain duplicate package.json files.

@kisPocok
Copy link

kisPocok commented Aug 6, 2015

We should skip devDependencies. +1

@blischalk
Copy link

I ran into this issue too and adding exclusions to the files property of NwBuilder seemed to help.

var nw = new NwBuilder({
  files: ['./**/**', '!./build/**/**'], // use the glob format
  version: "0.12.0",
  platforms: ['osx32', 'osx64', 'win32', 'win64']
});

notice the !./build//. I didn't think about excluding cache but I should add that too.

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 a pull request may close this issue.

6 participants