How to get the plugin template to work with npm/parcel? #3046
-
I’m having issues getting a custom plugin to work/integrate within my jsPsych experiment. It’s most likely an issue with scoping / modules - which I don’t quite understand. I therefore have a hard time figuring out why I cannot get the template to work - irrespective of it’s contents. I’m using a setup of
I first had an issue with the variable Would love any pointers on how to get a custom plugin to work in my Parcel / npm development setup. At some point in time I got the plugin to work when I used CDN urls rather than npm, but couldn’t tell you what I did then. Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
With a fresh mind I decided to look at the code of existing plugins again for clues. Not sure why I didn’t register before… but the code imports
and: (removing the
No idea if this is a hack, THE solution, and/or perhaps worth documenting in the development section? |
Beta Was this translation helpful? Give feedback.
With a fresh mind I decided to look at the code of existing plugins again for clues. Not sure why I didn’t register before… but the code imports
ParameterType
fromjspych
. I thus made the following changes which appears to have solved the issue:and: (removing the
jspsych.
prefix)No idea if this is a hack, THE solution, and/or perhaps worth documenting in the development section?