Apologies for the noob question. I’m a mostly back end developer, not worked with front end much in the last few years. Build tools like Brunch and Webpack are totally new to me. I’ve tried to read up as much as I can with it and I’ve spent a couple of days struggling to use a theme I bought with Phoenix.
It comprises css js and images, and also it has a vendor directory containing css, js and images for dependencies, like bootstrap, jquery etc…
I’ve put them in ‘assets’ but I’m getting a js error about something being undefined. Also it can’t find the images.
I assume that the js error could be to do with the order things are being loaded, perhaps?
If anyone can give me a hint or two that would be much appreciated.
There is blog post concerning bootstrap + brunch here
I made a blogpost about webpack 4 here
I think theme is more related to the css You choose.
If You put file into priv/static, You will bypass build process. If your brunch config is ok, You should find generated files under priv/static. If bundle is ok, You should also reference them in application layout.
If You show your config, You might have more precise answer.
Some themes aren’t necessarily assembled in such a way that lends them to be processed by a module bundler. In that case you can only “drop” the theme directly into priv/static and use it from there, similar to this case.
Now the most recent version of jQuery itself can be processed through the modern asset toolchain but often themes that use jQuery (especially older versions) were not created with the modern asset tool chain in mind.
Thanks for all the help so far. All works nicely in development. On deployment to production, apparently anything I manually put in priv is not included in the release. I’m using Edeliver with distillery, based on this guide from digital ocean: