question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't run vz-line-chart in demos (plugin development related)

See original GitHub issue

I’m working on a plugin for TensorBoard that uses the vz-line-charts and I’m unable to test the work using bazel run DEMO_TARGET as I get the following error in the browser:

Uncaught SyntaxError: Unexpected token export vz-chart-helpers.js:15

As I understand it, the JavaScript generated by the TypeScript compiler is considered a module (it contains top-level exports) and therefore won’t work in browsers without a module loader. As vulcanize inlines everything, this problem doesn’t show up in the distribution, just in development workflow.

How does Google deal with this when developing components? Even with small components, vulcanize takes quite a while to run and the generated file is impractical for debugging. I’d like a work flow that simply supports a browser refresh after a file edit. Apart from the module problem described here, this works well using bazel run DEMO_TARGET.

Any thoughts on how to with with these modules using this (or a similar) dev workflow?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
wchargincommented, Sep 2, 2017

I agree that it’s suboptimal. Within Google, we just work with it. Note that the generated file becomes much more debuggable if you ask Chrome to pretty-print it. (Firefox has an equivalent feature.) Variable names are minified, but property names never are, so you can quickly find a piece of code by looking for a nearby foo.somewhatUncommonPropertyName in your source and <C-f>ing for .somewhatUncommonPropertyName. It’s not the best, but it does the job.

I feel your pain, though, and would be very happy if we had some sort of incremental vulcanization.

0reactions
chihuahuacommented, Sep 8, 2017

@gar1t, indeed if you come up with ways to optimize/streamline the workflow, let us know or tell the world. That would be awesome. And yeah, that sums up our current approach.

Also, in general, feel free to ping us any time about your plugin, especially how we can unblock/assist.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SetupWizard doesn't show any demos - WordPress.org
Hi, After installing WP, OceanWP, Ocean Extra and Elementor, I'm executing SetupWizard but it doesn't show any DEMOs.
Read more >
How To Switch to a Different Demo - Documentation - OceanWP
If you have imported a demo, but would like to switch to a new one, there are two ways you can do it...
Read more >
Demystifying plugin development - Gavin McFarland (Config ...
This talk is not a tutorial on how to create a plugin in five minutes. In this session, Gavin will help you get...
Read more >
Developing packages & plugins - Flutter documentation
Developing plugin packages. If you want to develop a package that calls into platform-specific APIs, you need to develop a plugin package. The...
Read more >
In JetBrains plugin development, how to execute command in ...
I am new to plugin development for JetBrains and would like to know how I can execute a command in the terminal with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found