heroku / heroku-buildpack-emberjs

**This buildpack is deprecated!** Please use the official Node.js buildpack combined with the static or nginx buildpack instead.
71 stars 28 forks source link

Slug size #26

Closed fredguth closed 7 years ago

fredguth commented 7 years ago

heroku-buildpack-emberjs generates a slug that is too big. This didn't happen with https://github.com/tonycoco/heroku-buildpack-ember-cli, which I used before.

Here is what happens when I try to use this buildpack:

Built project successfully. Stored in "dist/".
File sizes:
 - dist/assets/remoto-5bcbd6229efcd73636a76ff86c48c2f6.css: 212.17 KB (24.47 KB gzipped)
 - dist/assets/remoto-8fbe692359d2de30abd7ba21008a7022.js: 646.68 KB (89.66 KB gzipped)
 - dist/assets/vendor-3c267ec08adee9dc8ca8f2f694662c03.js: 2.73 MB (731.77 KB gzipped)
 - dist/assets/vendor-bca15f8772c623fce89de22f4fcdeebc.css: 122.36 KB (13.71 KB gzipped)
 - dist/ember-cordova/cordova-d41d8cd98f00b204e9800998ecf8427e.js: 0 B
-----> Caching ember assets
-----> Writing static.json
-----> Fetching buildpack heroku/static
-----> Static HTML detected
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
-----> Installed directory to /app/bin
-----> Discovering process types
       Procfile declares types     -> (none)
       Default types for buildpack -> web
-----> Compressing...
 !     Compiled slug size: 342M is too large (max is 300M).
 !     See: http://devcenter.heroku.com/articles/slug-size
 !     Push failed

This is what happens when I use the "depracated?" https://github.com/tonycoco/heroku-buildpack-ember-cli:

Built project successfully. Stored in "dist/".
       File sizes:
        - dist/assets/remoto-5bcbd6229efcd73636a76ff86c48c2f6.css: 212.17 KB (24.47 KB gzipped)
        - dist/assets/remoto-8fbe692359d2de30abd7ba21008a7022.js: 646.68 KB (89.66 KB gzipped)
        - dist/assets/vendor-bca15f8772c623fce89de22f4fcdeebc.css: 122.36 KB (13.71 KB gzipped)
        - dist/assets/vendor-fd2b0840cfa60d08163b997179d27503.js: 2.73 MB (731.76 KB gzipped)
        - dist/ember-cordova/cordova-d41d8cd98f00b204e9800998ecf8427e.js: 0 B
-----> Discovering process types
       Procfile declares types     -> (none)
       Default types for buildpack -> web
-----> Compressing...
       Done: 32.8M
-----> Launching...
hone commented 7 years ago

That's a big difference. The only thing I can think of would be things in node_modules or installed by bower that aren't cleaned up. How big are those dirs locally?

fredguth commented 7 years ago

node_modules 866M bower_components 144M

hone commented 7 years ago

@fredguth can you try again, the slug size recently got bumped to 500mb. That being said, I'd still like to find a way to remove unnecessary node_modules. /cc @rwjblue we should talk about what we can safely remove for fastboot.

fredguth commented 7 years ago

@hone: worked! :tada:

Slug size is still considerably bigger then using https://github.com/tonycoco/heroku-buildpack-ember-cli, but it works.