I’ve added myjs.js to assests/scripts. Then, I referenced it in manifest.json as seen below. But, it’s not being compiled to main.js file. I know main.js is being watched because if I write to it, the update takes effect via Browsersync.
@kalenjohnson Not watching, but just running gulp produces an error, so that doesn’t seem to be the case.
I’ve read in an older discussion to set it up like it’s written below, but wasn’t sure if this was outdated procedure.
Also, while the following works, there’s no way to have assets/scripts/vendor/slider.js file to run before assets/scripts/main.js when dist/main.js is compiled:
Yes, if you are adding your own script, you do need to add it to manifest.json
Sweet, so then I can confirm that this problem still exists. When I do similar to OP, I do not see the code from my-custom-script.js in the build version of main.js.
Is there any progress to fix this issue? Or maybe there’s an alternative that I don’t know about?
Was getting the same thing, except I was only adding a js file, no styles. I checked the asset-builder globs and my added script was different than the others, because it was missing the assets folder prefixed to the path. It makes sense because in the screencast and on the asset-builder docs it’s going two directories up instead of three to get to plugins. So, concluding the “problem” here is that the “vendor” type starts in the theme folder not the assets folder - for some reason while “files” starts in the assets folder. Hope I have this right… seems to check out as I’ve just tried it.