gwtgwt-super-dev-mode

GWT SuperDevMode overwrites production code when using launcherdir


I'm trying to use the new SuperDevMode with -launcherdir parameter and currently I point launcherdir to the same folder as where production code is deployed.

The effect is that the .nocache.js file gets overridden by SuperDevMode's nocache.js file and it's impossible to run the app in production-mode(hosted mode) without doing another full recompile.

Is there any way to switch back and forth between SuperDevMode and production mode?

Thank you!


Solution

  • This is indeed how SDM works; the solution is to use distinct output folders for production and dev modes, but this all depends on your build tools, etc.

    For instance you could assemble your web app in a distinct folder so you can run it with DevMode.
    Or you can use a separate server (or even possibly a reverse proxy) that you configure to load the CodeServer-generated nocache.js in priority over the production one from your assembled webapp. This is what I do in Maven with the Tomcat or Jetty plugins for instance.