index.js file is out of public folder
index.js file:
import {svgPDF_File} from './public/func.js';
console.log( svgPDF_File );
this file is in public folder and connect with index.html
func.js file:
$(donwload_btn).on("click", function () {
const pdfView = $(".GENERATE_PDF_DONWLOAD").html();
const svgPDF_File = document.getElementById("SVG_DATA").value = pdfView;
export { svgPDF_File };
})