alallier/reload

Is there a way to force the index.html to always be what is reloaded in that case of a single page app?

wking-io opened this issue · 3 comments

Was looking into this and wanted to know if it was possible. Or at least where in the code the change would need to happen to add this as an option

It will reload whatever pages you put the reload script tag on.

Okay I ran into this issue where when I was on the route "/other-page" of my app it says that it cannot be found.

Note that I am using the CLI not the API.

Could we add a option to the reload-server check to make all routes hit that first conditional?

  if (
    (pushState && fileEnding === undefined) || // this captures all regular routes when pushState option is true
    fileEnding === 'html' ||
    pathname === '/' ||
    pathname === ''
  ) {
    // Server side inject reload code to html files
    if (
        pathname === '/' ||
        pathname === '' ||
        pushState // this is the boolean passed from the argument
      ) {
      pathname = dir + '/' + startPage;
    } else {
      pathname = dir + '/' + pathname;
    }