Looking for sharing common JS functions (Client side) from one file to different component Js file.
Hello there,
We are hacing some common code which is repeating in several components. Also we have some common sharable JS functions which I want to share with a few components.
I am looking for some help around clientlib site. I have these 3 files.
ComponentA
fileA.js
ComponentB
fileB.js
ComponentC
fileC.js
commonfunctions.js (All sharable functions are there)
How do I configure the import/export using babel/webpack in order to refer common function from "commonfunctions.js" file "fileA.js" and "fileB.js"
Any documentation or help will be appriciated.