summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-09-09 14:38:21 +0300
committerVaadin Code Review <review@vaadin.com>2013-09-10 13:14:03 +0000
commite4d99b3631a70a9ca11c085b4de09b4daf400176 (patch)
treec63bcb002cb0a99cdc55d95be43e1d00bc0c6ce6 /server
parent0d79a84494b21a3b553d56245c4a1ee09fb022b4 (diff)
downloadvaadin-framework-e4d99b3631a70a9ca11c085b4de09b4daf400176.tar.gz
vaadin-framework-e4d99b3631a70a9ca11c085b4de09b4daf400176.zip
Use non-obfuscated version of vaadinPush.js when not in production (#12527)
Change-Id: I8e0baec2391b140e6a72eedf6606fd2792c735bc
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/server/BootstrapHandler.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/server/src/com/vaadin/server/BootstrapHandler.java b/server/src/com/vaadin/server/BootstrapHandler.java
index b21fdb0b74..0a4949ffa7 100644
--- a/server/src/com/vaadin/server/BootstrapHandler.java
+++ b/server/src/com/vaadin/server/BootstrapHandler.java
@@ -388,9 +388,16 @@ public abstract class BootstrapHandler extends SynchronizedRequestHandler {
if (context.getPushMode().isEnabled()) {
// Load client-side dependencies for push support
+ String pushJS = vaadinLocation;
+ if (context.getRequest().getService().getDeploymentConfiguration()
+ .isProductionMode()) {
+ pushJS += ApplicationConstants.VAADIN_PUSH_JS;
+ } else {
+ pushJS += ApplicationConstants.VAADIN_PUSH_DEBUG_JS;
+ }
+
fragmentNodes.add(new Element(Tag.valueOf("script"), "").attr(
- "type", "text/javascript").attr("src",
- vaadinLocation + ApplicationConstants.VAADIN_PUSH_JS));
+ "type", "text/javascript").attr("src", pushJS));
}
String bootstrapLocation = vaadinLocation + "vaadinBootstrap.js";