simple webpack setup. index.html and index.js files. In HTML is button onclick="ok_click()". Why can I not call the ok_click function that is defined in the index.js file? I get function not found error.
I tried to export the ok_click function from index.js. Then in index.html, inside script tag, import from index.js. Get error saying the import statement is not recognized.
in index.html
<button onclick="ok_click( )">ok</button>
in index.js
function ok_click( )
{
console.log('in ok_click') ;
}
export { ok_click } ;