I'm writing an application with Laravel and using NPM to compile my JavaScript codes and I want some of my functions to be accessible from my document and actually I'm trying to call a function in onclick attribute of an i-tag. I've tried npm run watch-poll, module.exports and they didn't work.
is it possible to access those functions from document or not or should I write those functions that I want to be accessible in the document it self?