after 72ed5913 i cant load the react client:
Error: Function called outside component initialization
which traces back to svelte calling get_current_component after importing svelte in src/client.js
Thanks for the report! 72ed591 isn鈥檛 included in the latest release; are you installing from GitHub directly?
OK, I can reproduce this using 0.39.15, so I suspect this was actually introduced in 271aecd18bd14aa5a331d615a844762c22b94536, and likely not fixed by 72ed591.
Reproduction: https://codesandbox.io/s/test-bgio-latest-l8obj
OK, I think the bug was caused when we moved svelte from devDependencies to dependencies (to make svelte鈥檚 type declarations available to boardgame.io users). Our Rollup config marks any direct dependency in package.json as external:
That led to the bundle including import 'svelte' or require('svelte') statements, which it shouldn鈥檛 (see unpkg for an example). In short import 'svelte' is there for Typescript, not for JS functionality, so shouldn鈥檛 be included in the bundle output. Running a few more local tests, and then I鈥檒l open a PR to fix this.
Oh I got this bug too.
@jakehsiao I鈥檇 recommend downgrading to [email protected] for now. If you鈥檙e using Typescript, you may need to downgrade to 0.39.13 as there were some issues with the types in 0.39.14.
0.39.16, so you can try that.Thanks @nicolodavis!
Most helpful comment
767 is available in
0.39.16, so you can try that.