I am just getting started learning DocPad and hope to use it on a few sites that will serve some fairly javascript heavy pages. I am also hoping to be able to keep the javascript as modular as possible using nodes export and require conventions because much of the code I want to use has already been written that way.
I’ve install the babel and browserifydocs plugins, but I am getting errors every time I try use import or require. If I follow the directions on the babel plugin site and add
---
browserify: true
---
to the js.babel files, I get an Invalid left-hand side expression in prefix operation error.
Is it possible to use javascript I have or do I need to add all of the javascript files in the @getBlock(“scripts”) line of the layout file.