-
Notifications
You must be signed in to change notification settings - Fork 18
getContext doesn't work in a component #26
Comments
The same problem |
Issues derived from How's your setup? Webpack? Parcel? Rollup? Svelte-cli? |
This is my rollup config:
|
Please update |
Thank you. |
Can you setup a gist at svelte-repl with the code you're using for? I never tried to work along with aliases pointing to svelte sources, the thing is that It's hard to figure out what's different with no more clue. |
Thank you for your help on this. Actually my build had a strange behaviour after I updated the resolve plugin. I know my code updated because I'set tests with set/get Context in different places and I could see them in the browser, but after that it stopped to build with a very cryptic reason ; so i rolled everything back. I could setup a gist but now I am not confident with my build ; I actually suck at configuring rollup or webpack or whatever. Could you show me how do you import svero in the REPL ? |
Check out this example: https://svelte.dev/repl/cbce750dd5f3407eb06c9e7a28fec815?version=3.6.8 You must download it to examine how is setup, the REPL is not allowing URL redirections from. |
Thank you. Indeed it seems to work here. I found that when initializing, Maybe this information will give you an idea of the problem. Edit: it gave me an idea: This is what i use, and it doesn't work: But this works:
Edit 2 :
It is normal not to have a parent component. So why does it work on the REPL ? |
We're not longer doing that (v1.0.0), instead we're using
The REPL is loading the latest version, which version you're using? |
|
Ok it works well with the fresh version ! |
No problem, glad to help you! 🍻 |
getContext(someKey)
does not work in a component rendered by aRoute
, whereas it works wen directly calling the component aside to the<Router/>
.The text was updated successfully, but these errors were encountered: