简体   繁体   中英

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)

项目树

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM