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

Stats #1257

Closed
Rich-Harris opened this issue Mar 18, 2018 · 0 comments
Closed

Stats #1257

Rich-Harris opened this issue Mar 18, 2018 · 0 comments

Comments

@Rich-Harris
Copy link
Member

As mentioned in #1250, it would useful if svelte.compile returned an object that included stats about the component, including things like:

  • performance timings
  • imports
  • used lifecycle hooks
  • used components
  • declared methods
  • expected data properties
  • computed properties
  • warnings

This would allow us to determine, for example, whether a given Sapper page had any interactivity (if not, no need to serve and run JS to hydrate the page). It would also be relevant to #1102 (whole-app optimisation), though it would take at least two compiler passes unless we also had a svelte.analyse function or something.

Also, it would allow svelte.validate to be removed from the public API, which is good because it currently depends on Stylesheet which is rather awkward.

See also #795.

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

No branches or pull requests

2 participants