I’m using CapacitorJS, I got two pages of which only one of those is included when “npm run build” is entered into CLI which makes my javascript redirect invalid.
I got two html files “index.html” which is the landing page of the app & “sigin.html” for signin. When I try to use javascript to redirect, on button click nothing happens. But i’ve noticed that when “npm run build” is entered in the CLI “signin.html” isn’t created in my “dist”-folder. Which is.. why I can’t redirect as the file dosen’t exist. I know this because the it’s working if I change “signin.html” to “index.html” and also there is no “signin.html” inside the “dist”-folder.
So my question now is, how can i make the build include “signin.html” & “signin.js” when i run “npm run build”?
document.addEventListener('DOMContentLoaded', function() {
var button = document.querySelector('.agree_terms_of_use_btn');
button.addEventListener('click', function() {
alert("fok");
var newURL = "signin.html";
window.location.href = newURL;
});
});```