electron-userland / electron-compile

DEPRECATED: Electron supporting package to compile JS and CSS in Electron applications
1.01k stars 99 forks source link

Failed to compile /: Can't stat / #288

Closed chenfengyanyu closed 6 years ago

chenfengyanyu commented 6 years ago

I use react-router, but can't refresh.otherwise,it failed to compile.Here is my code:

<Router>
     <Switch>
          <Route path="/" exact component={Upload} />
          <Route path="/list" component={ListPage} />
          <Redirect to="/" />
      </Switch>
</Router>

Did anyone know what had happened? And what should I do?

MarshallOfSound commented 6 years ago

@chenfengyanyu You have to use the memory router or the hash router, otherwise you will be navigating around on the file:// protocol.

chenfengyanyu commented 6 years ago

@MarshallOfSound You are right, thank you very much!