dartdart-editor

Weird DartEditor behavior / bug?


I'm working on a little website using dart. I have one project for the server, and another for the client app (see picture below)

project tree

In the server app I serve the client app from the client project like this

runServer() {
  var staticHandler = createStaticHandler(r"C:\Users\Lukasz\dart\linkShepherdClient\web\", defaultDocument: 'linkShepherd.html',serveFilesOutsidePath: true);
  var handler = new Cascade()
                      .add(staticHandler)
                      .add(routes.handler)
                      .handler;
  io.serve(handler, InternetAddress.LOOPBACK_IP_V4, 8080).then((server) {
    print('Listening on port 8080');
  }).catchError((error) => print(error));   
}

Everything worked fine. But now the changes I do in the client project stopped affecting the site served by the server (a site still loads, just an older version, with slightly different styling, but most importantly also an older .dart script file). When I run the client directly from it's project everything is up to date. Opening and closing the editor does not help. Is the dart editor actually creating some sort of cache?


Solution

  • The cache might be from dart:io. You should probably launch a pub serve instance and redirect to this during development anyway. This way any transformers (Angular, Polymer, ...) are applied as well. When deployed the server should serve the build output of the client.