Replies: 2 comments 2 replies
-
Hi @mkaesler, One solution would be to use a tool like webpack to convert the modules. A useful tool here might be jspsych-builder, which provides all the necessary tooling to bundle your modules into something that any browser can interpret. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Hi Josh,
Thanks for the hint re webpack as a way to bundle and convert, and thanks
for the great library too!
Kind regards,
Matt
…On Thu, May 4, 2023 at 10:31 PM Josh de Leeuw ***@***.***> wrote:
Hi @mkaesler <https://github.com/mkaesler>,
One solution would be to use a tool like webpack to convert the modules. A
useful tool here might be jspsych-builder
<https://github.com/bjoluc/jspsych-builder>, which provides all the
necessary tooling to bundle your modules into something that any browser
can interpret.
—
Reply to this email directly, view it on GitHub
<#3024 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AK5HMFOW3UCADBVEHDZBKWDXEOSC5ANCNFSM6AAAAAAXVMIT64>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I'm interested in using firebase to save data from jspsych experiments. Version 9 of firebase is modular, and the functions for interacting with firebase need to be imported in <script type="module">. The functions imported in modules are not available in the global scope, which means that they can't be called in a script tag before the main experiment. This is annoying, because I need these functions to save the data to firebase!
My simplest workaround is to just make the experiment script type="module" and move the imports to the start of the experiment script. This does work in that the firebase function are now accessible in the experiment script and the data saves, but I'm wondering if :
a) the strict mode induced by the script tag will break some parts of jspsych, and
b) if there is another way to make these firebase functions available without changing main experiment script in to a module?
Kind regards,
Matt
Beta Was this translation helpful? Give feedback.
All reactions