Wednesday, 16 October 2019

Advice/help embedding googles model-viewer in wordpress (node/php)

Hi everyone!I hope I don't come off as someone in dire need to rtfm, but I would appreciate some help, as i'm not very versed in webdev. Any feedback from people more experienced would be fantastic. I'm currently trying to embed googles model-viewer webcomponent in a wordpress website.So far I've loaded a external bundled build with something like pbw_hook_javascript() in functions, and it runs no problem, however when I check the github page it says this:"For production use cases we recommend that you use the npm package and your own bundler (such as Rollup or Webpack) to eliminate potential duplicate dependencies."you can read more here:https://github.com/GoogleWebComponents/model-viewerUsing a standard webhost with cPanel w/ shell access and so on. The wordpress site has been installed already through a automated script, and has quite a bit of content on it. It can't be reinstalled in any way, so we don't want to brick anything.Now, from what i've gathered node.js is a prerequisite for using rollup/webpack. How risk-free is it to install node.js, and will I have to to lots of API/complicated shit to make php/node play nice? I don't need node for anything else. I dun wannit. I only want the damn fancy model-viewer to work as smoothly as possible, I only want a bundled version.Found this as well:https://stackoverflow.com/questions/9831594/apache-and-node-js-on-the-same-serverSo; I come to you in my time of need.What big are the drawbacks to using the external bundled build? Essentially: is it worth it to fight through all of this?And is there perhaps another really obvious solution here that I'm missing?If any kind soul could give me a bit of guidance, I would much appreciate it :)If you know of any other relevant forums I could crosspost to, please let me know.Thank you!

Submitted October 16, 2019 at 12:56PM by scared_dinosaur

No comments:

Post a Comment