Feature request: Import from JSON files

As a visualization author, I want to be able to import from .json files, because that’s something you can do in Webpack (even though it’s not part of the ES6 module standard).

Not sure if this is a Good Idea or not, but it seems feasible to make work using this Rollup plugin https://github.com/rollup/plugins/tree/master/packages/json

Pros:

  • Reduce friction when folks are porting from code that uses Webpack.
  • Compatible with Webpack (e.g. you could drop code from VizHub into a create-react-app context and everything would still work).

Cons:

  • Non-standard behavior
  • Requires an additional Rollup plugin in the exported viz, which adds complexity to the exports