I am trying to read the query parameter in javascript file.
Code-
index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Chat App List</title>
</head>
<body>
<div id="app"></div>
<script src="bundle.js?cid=vivek"></script> // I am trying to read value of cid in bundle.js file
</body>
</html>
So far , i tried using window.location.href
in bundle file but it is giving undefined
because it reads from url and the url serves index.html
file