What is data-main attribute? The data-main attribute is an attribute that RequireJS will check to start script loading. The data-main set to the base URL for all the scripts. Example - <! DOCTYPE html > < html > < head > < script data-main = "libs/main" src = "libs/require.js" ></ script > </ head > < body > < h1 > RequireJS Sample apps </ h1 > </ body > </ html > I hope you are enjoying with this post! Please share with you friends!! Thank you!!!
Angular, React, JavaScript, Java, PHP, SQL, C#, Vue, NodeJs, TypeScript and Interview Questions Answers