-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vite CommonJS error #1057
Comments
While a fix for this problem is investigated, be aware that ink is known to work with Vite, see : https://github.com/floriancargoet/vite-plugin-ink |
thanks - i ended up forking the project and specifying doubt this works for all cases though changing es6 output file to .mjs and importing from inkjs/dist/ink-es6.mjs works too |
just to add context - looks like vite-plugin-ink doesnt work as is for similar reasons
|
Latest version (2.2.4) should solve all your problems ! Let me know. |
yes it does!! thanks so much |
I'm having issues importing Story in next.js //@ts-ignore I also cannot seem to import Choice anymore like I used to: (This works in 2.2.3) Thoughts? |
In 2.2.4, you should be able to do
and if you need the Compiler
There are no improvement between 2.2.3 and 2.2.4 except this change of packaging so if 2.2.3 works,you're better off not changing version |
Hmm, neither of those work for me in 2.2.4
I can freeze my version for now, but I'm expecting we'll need to update at some point here |
As of now, there are no scheduled updates of the ink runtime or the inkjs library. |
Describe the bug
CommonJS issue with recent SvelteKit versions (2.0+ and vite 4.0+)
recommended default export doesn't work neither
To Reproduce
import { Story } from 'inkjs'
this is all it takes to trigger an error in SvelteKit (presumably any vite app?)
Expected behavior
access to Story export without errors
Ink files
N/A
Environment
Additional Comments
might be helpful/relevant:
https://kit.svelte.dev/docs/faq#how-do-i-fix-the-error-i-m-getting-trying-to-include-a-package
https://publint.dev/[email protected]
The text was updated successfully, but these errors were encountered: