Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

Stop emitting ng_*.json #276

Closed
Tomucha opened this issue Feb 13, 2017 · 5 comments
Closed

Stop emitting ng_*.json #276

Tomucha opened this issue Feb 13, 2017 · 5 comments
Milestone

Comments

@Tomucha
Copy link

Tomucha commented Feb 13, 2017

  1. Take your favourite Angular2 project
  2. run "pub build"
  3. inspect the results in ./build/web

Expected behaviour:
"pub build" creates clean output which can be directly uploaded to the production environment.

Observed behaviour:
There are many files which are probably not needed in production (?): ng_meta.json, ng_summary.json ...

Please note that for example Google App Engine limits a number of files in app package in quotas. Not mentioning the amount of data which is transferred, distributed to CDN, archived, etc.

I understand that it might be hard to solve right know and that it depends on "pub" itself. For now, please provide some "safe cleanup script":

  rm `find . -name *.ng_*.json`
@zoechi
Copy link

zoechi commented Feb 13, 2017

AFAIK this is a transformer limitation, files can't be deleted once created.
I haven't found where I saw this being discussed.

@Tomucha
Copy link
Author

Tomucha commented Feb 13, 2017

You saw it here: https://plus.google.com/u/0/+TomasZverina/posts/gjigzCB2qY6

... but it still needs to be solved.

@Tomucha
Copy link
Author

Tomucha commented Feb 17, 2017

For example - we have this backend administration app in Angular2.Dart. We removed all probably unnecessary files from build/web:

 rm `find . -name *.ng_*.json`

... and final "war" package is now 18MB smaller.

@matanlurey
Copy link
Contributor

matanlurey commented Mar 16, 2017

There is no way to do this unfortunately with barback (pub transformers).

We're working on a new compiler that won't have this limitation, though.

I'll leave this open as a tracker.

@matanlurey matanlurey changed the title Plenty of probably unnecessary files in "pub build" output Stop emitting ng_*.json Mar 16, 2017
@matanlurey matanlurey added this to the Post-V3 milestone Mar 16, 2017
@matanlurey matanlurey modified the milestones: Post-V4, Post-V3, V4 Beta May 12, 2017
@matanlurey
Copy link
Contributor

matanlurey commented May 24, 2017

Blocked by #404.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants