Pollo
Pollo15mo ago

I cant import the Zustand module from deno.

I leave a photo of what it shows when I put the url to the import map. And try to cache the module.
13 Replies
Pollo
Pollo15mo ago
I also tryed use npm: but i cant import the vanilla relative path.
SyrupThinker
SyrupThinker15mo ago
If you want to import the index.ts with plain zustand the import map should point to the https://deno.land/x/zustand@v4.4.0/src/index.ts file. For the vanilla import you also need to point to the actual file, so
import {} from "zustand/src/vanilla.ts";
import {} from "zustand/src/vanilla.ts";
Pollo
Pollo15mo ago
Nice Thanks, i guess is full fixed. let me test it a bit to close this 😄
Pollo
Pollo15mo ago
Pollo
Pollo15mo ago
I got this ^^
Pollo
Pollo15mo ago
Pollo
Pollo15mo ago
If i take off the first line. no more error. But i would like to use the useStore What libraries do you guys use with preact to handle stores?
SyrupThinker
SyrupThinker15mo ago
Hmm ok, that file is not a proper ES module. Let's go with npm, does npm:zustand@4.4 and npm:zustand@4.4/vanilla work for you, or how does it fail?
What libraries do you guys use with preact to handle stores?
Can't help with that, gotta hope somebody else sees this or just ask in #fresh I guess 🤷‍♂️
Pollo
Pollo15mo ago
let me test it.. and about the libraries, ill go ask in fresh 🙂 Im just trying things nothing "real" xd
Pollo
Pollo15mo ago
I got this.
Pollo
Pollo15mo ago
Is just a hook, so no problem without using it. I can use zustand without that Thanks for the help, i have to close this thread or something ???
SyrupThinker
SyrupThinker15mo ago
No problem, you don't have to, but you can add the "Solved" tag to the thread.
Pollo
Pollo15mo ago
Ready 🙂