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

Consume perspective with esbuild #1655

Closed
LukeSheard opened this issue Dec 7, 2021 · 2 comments · Fixed by #1918
Closed

Consume perspective with esbuild #1655

LukeSheard opened this issue Dec 7, 2021 · 2 comments · Fixed by #1918
Labels
JS question Questions about use, potential features, or improvements

Comments

@LukeSheard
Copy link
Contributor

Support Question

While perspective itself is build with esbuild there's no documentation for projects which are using esbuild themselves to build their applications.

I setup a simple test to see whether this worked directly and it does, however it produces a 12.2MB bundle which is just un-consumable and there's a warning about perspective being inlined.

I couldn't find on the website or in the issues any documentation for setting up with non-webpack projects. I would imagine there needs be to a separate esbuild plugin for consuming perspective similar to webpack?

@timkpaine
Copy link
Member

#1611 (comment)

@timkpaine timkpaine added JS question Questions about use, potential features, or improvements labels Dec 7, 2021
@texodus
Copy link
Member

texodus commented Dec 8, 2021

There is a plugin for this in tools/perspective-build that perspective uses to build itself; we plan to publish this in 1.1.0.

While the inline-ed version is a large JavaScript file, in practice the difference between these builds on initial load time over a modern connection is likely to be quite small (e.g. 200ms vs 1.5s, testing myself on a 5g device from unpkg). This is unfortunate, but not un-consumable - is there something I'm missing?

Paralell/native wasm perspective example

Inline single-js perspective example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JS question Questions about use, potential features, or improvements
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants