Skip to content

Option/hook to allow uploading the generated json data #209

Description

@IARI

I would like to have a database/platform which keeps the generated json data
(+ maybe some CI related environment data, like commit hash, branch name, date, etc)

First I though ot uploading the stats.json with some CI job afterwards, but its a multi-stage docker-in-docker build, and getting build-repoorts out of the build-stage feels like a nightmare.

So I think it makes a lot more sense to just have vite itsself manage this and avoid additional bash.
For now I am just using
visualizer({
template: 'raw-data'
}),

Plus a custom plugin which is run afterwards, where I

  • read stats.json
  • then post the data to some endpoint

It would be super nice, if the rollup-plugin-visualizer would support this use-case:
The plugin options could offer a hook that allows me to do something custom with the json data, instead of

  • unnecessarily writing or emitting a file
  • which is also for my case unne formatted with spaces due to the null, 2 arguments passed to JSON.stringify

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions