Vega-lite: Provide non-minified distribution

Created on 25 Dec 2019  路  5Comments  路  Source: vega/vega-lite

The current way VegaLite distributed is by including minified version only

<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>

If error thrown (like example below), it's very hard to figure out what's went wrong

ERROR TypeError: Cannot read property 'length' of undefined
    at vega-5.9.0.js:1
    at Array.reduce (<anonymous>)
    at vega-5.9.0.js:1
    at Array.forEach (<anonymous>)
    at Mt (vega-5.9.0.js:1)
    at Lr.Ur.visit (vega-5.9.0.js:1)
    at nu.ot.transform (vega-5.9.0.js:1)
    at nu.Kr.evaluate (vega-5.9.0.js:1)
    at nu.Kr.run (vega-5.9.0.js:1)
    at wB.Jr.evaluate (vega-5.9.0.js:1)

Most helpful comment

All 5 comments

Jsdelivr also has unminified bundles at https://www.jsdelivr.com/package/npm/vega-lite?path=build.

@domoritz Can you please formulate your answer in terms of a <script> code line?
In addition, would this be a useful point to add to the vega-lite docs? (e.g in a debugging vega-lite section)

Sure. I鈥檒l do that when I get back to my computer.

For example, you can load non-minified Vega-Lite with:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/vega-lite.js"></script>

I'll add a debugging guide in a follow-up pull request.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kanitw picture kanitw  路  4Comments

iliatimofeev picture iliatimofeev  路  3Comments

kanitw picture kanitw  路  3Comments

ijlyttle picture ijlyttle  路  4Comments

kanitw picture kanitw  路  3Comments