I am using electron to create an application.
The main page has two buttons - Button 1 and Button 2.
On Click of the button, I am redirecting to another Html Page.
<div class = "container">
<a class="btn btn-success" href="./src/page1.html" role="button">Go to Page 1</a>
</div>
<div class = "container">
<a class="btn btn-success" href="./src/page2.html" role="button">Go to Page 2</a>
</div>
Then in the Page1.html, I am adding the corresponding JS in script tag.
<script src="page1.js"></script>
However, in the JS file, I am not able to use the require function.
Error: Require is not a function.
However, require function works fine in main.js
Please help me in figuring out what am I doing wrong. I have just recently started with Electron.
Any help appreciated.