Closed slumtrimpet closed 3 years ago
Possibly a fix to get the build checks working could be:
var global = global || window;
But, the access of 'global' here is still hokey.
Hi, you should use the webpack bundle that handles this automatically. Check your dev setup, raise an issue if you have any questions.
Hi, you should use the webpack bundle that handles this automatically. Check your dev setup, raise an issue if you have any questions.
The issue is VUE3 standard install doesn't use webpack anymore, it uses VITE. https://v3.vuejs.org/guide/installation.html#vite
EDIT: this is of course all Google'able, but here's a decent writeup on the difference: https://vuejsdevelopers.com/2020/12/07/vite-vue-cli/
Ok, so you need to use the bundle file. See the readme and try to install the client as if you where on react native.
Ok, so you need to use the bundle file. See the readme and try to install the client as if you where on react native.
Gotcha! It's a bit of a WIP hack at the moment, but the following seems to make Vue3 + Vite + Typescript happy and I'm continuing with testing the platform.
import { DeepstreamClient } from "@deepstream/client";
import { DeepstreamClient as DeepstreamDistClient } from "@deepstream/client/dist/bundle/ds.js";
const client: DeepstreamClient = new DeepstreamDistClient("localhost:6020");
client.login();
Thanks for your help on this!
great, please feel free to make pulls to the readme in order to alert other vite users
"global" is not valid in client-side code. Here is one proposed patch that gets things working, but possibly a different refactor makes more sense.