I have installed the Selectize Javascript plugin to my site via NPM. I then copy this file into a public facing directory using gulp.
My problem now is including a plugin file. From within my public asset directory I have the following structure /src/plugins/selectable_placeholder which is as per the structure required in the selectize instructions https://github.com/brianreavis/selectize.js/blob/master/docs/plugins.md
However including, or not including the JS file leads to an error where either
Uncaught Error: Unable to find "selectable_placeholder" plugin
Or
Uncaught ReferenceError: Selectize is not defined
Both are caused by the file either not being picked up, or if finds the file and then cannot find the Selectize object.
I can see why this is happening, but now how to fix it, other than by hacking the core selectize code which defeats the point in the plugin features..
Anyone got any ideas?