Can't find variable 'require' for custom js in app

Sorry for being brief yesterday.

Check here: https://github.com/aruizramon/frappe_analytics
also here: Calendar view for sales opportunity? - #8 by ericmachine88

Chart.js is in the public folder there, and used in analytics/analytics/page/ (both pages). Essentially by hooking into the built chart.js all of the classes and functions are exposed for you to use in the rest of Frappe. It isn’t the most ‘efficient’ because you end up including it in head (every page) but it’s the simplest way so far.

1 Like