-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Create Vite Plugin for Perspective #1734
Comments
That would be amazing! I was trying to read through the webpack plugin to see if I could port it, but it went over my head. |
Anyone have an idea of the probability of this being addressed in the near future? I feel this would be very useful and keep Perspective relevant/up to date with modern tooling. |
I don't know anything about Vite, but Perspective should build fine in Vite without a plugin as per docs - does it not currently? The Due to Perspective using a number of features that require bespoke build support (WebAssembly, WebWorkers, |
@texodus . First, I love Perspective. Second, the "as per docs" link in your previous message is broken. Trying to figure out how to integrate Perspective into a SvelteKit app and thought the reference might help. |
The docs page has changed since this discussion came up, but the advice still holds - you should not need a custom build plugin for perspective. Just follow the instructions on the JavaScript docs, skip the section on the (optional) Please open a new Issue if this isn't the case - be sure to provide sufficient detail that we can debug, a simple repo that repros the issue eg. |
@texodus , I got it working! Check out the repo here: https://github.com/riziles/svelte-perspective, deployed here: https://steady-cat-fb5198.netlify.app/ . |
Hi @riziles ! I tried your repo and it worked with yarn v1.22.19
|
Unfortunately, @spff , I do not. I have very limited experience with Yarn (and JS in general). Apparently there are known issues trying to use Yarn 2 or 3 with SvelteKit: https://kit.svelte.dev/faq#does-it-work-with-yarn-2 (which stinks, because Svelte is awesome!). Sorry I can't be more help. Also, I have a more recent example I put together here: https://github.com/riziles/svelte-perspective-starter1 If you'd like to continue the discussion, feel free to open an issue in one of my repos since this issue is already closed. |
@riziles thanks for these examples. I was able to get the node websocket example running using your starter template as a guide. +1 for a vite plugin that does any additional optimizations and such (realizing of course what a pain these development targets are!). |
@brochington has built a Perspective/Vite example repo |
My issue, for svelte, was that I had |
This is probably not related to the fact that no Vite plugin is required, but i'm unable to make it work with Vue3, Vite, and Perspective (v3+). It worked fine with version 2. Was anyone able to solve this? I'm facing the same issue as the one discussed on #2725 |
I'm facing a similar issue, the cdn build works fine, but not vite. |
@aayoubi @aszenz any luck solving it? I'm having the same problem with vite build with config:
|
@fikander here's a working sample (with Vue and Vite) thanks to @rajsite's inline workaround |
Feature Request
Description of Problem:
Vite is a next-gen build tool that is on the rise in JS apps these days. It would be great for Perspective to have a Vite compliant plugin as it does for Webpack today.
Potential Solutions:
The text was updated successfully, but these errors were encountered: