Closed blurymind closed 3 months ago
In 2.2.4 it should now be
import { Story, Compiler } from 'inkjs/full';
if you need the Compiler. The documentation will be updated shortly. Some things are being polished.
interesting.. why was the Compiler moved to this /full subpath? Is this something to do with reducing deploy size?
It has always been inside a special built package/file named inkjs-full.js which was the main entrypoint of the package (because no one put much thought in this at the time).
Which means that when building a game where you needed only the runtime, you had to embark the full compiler (which roughly double the size).
As for inky's webexport and such. They've always used ink.js, the "runtime-only" code.
Btw, it's just a virtual subpath, it points to the same ol' ink-full.js (now an .mjs file)
I see, but it does make the api a bit un-intuitive with this extra gotcha. Thats ok though, if it saves a few kb :)
Thanks for clarifying this. I guess just updating the docs would be sufficient to close this ticket
In version 2.2.0 you can do this
import { Story, Compiler } from 'inkjs';
Compiler is definedOn the latest version only Story is exported, Compiler is undefined.
All of your documentation points to this being a valid way to import it