devsoap/ds-gradle-vaadin

How to build Vaadin 14 app in "production mode"

Closed this issue · 4 comments

Desktop:

  • OS: Windows 10
  • JDK version: 8
  • Gradle version: 6.0.1
  • Vaadin Plugin version: 1.3.4

Describe the bug
Example java app (Vaadin 14) does not visualise correctly on IE 10 & 11.

To Reproduce
Steps to reproduce the behavior:

  1. Use next build.gradle:
plugins {
    id 'com.devsoap.vaadin-flow' version '1.3.4'
    id 'war'
}
devsoap {
    email = '****'
    key = '****'
  }
vaadin {
    version = '14.1.3'
    submitStatistics = false
}
vaadin.autoconfigure()
repositories {
    vaadin.repositories()
}
dependencies {
    vaadin.enableProductionMode()
}
  1. Create demo app by run gradle vaadinCreateProject --name MyProject --package com.example
  2. Run Gradle task 'war'
  3. Deploy war file to the Tomcat (8.5.46)
  4. Open page in Chrome and in IE

Expected behavior
Corret visualization of components.
image

Behavior in IE
image

Additional context
The same app built with maven looks correct in IE 10 and 11.

Am I right that I need only add vaadin.enableProductionMode() as dependencies to put app into production mode? I tried to add web.xml file with

    <context-param>
        <param-name>productionMode</param-name>
        <param-value>true</param-value>
    </context-param>

but behavior was the same.

Hi, I'm sorry but IE10 and IE11 with Vaadin 14 is not supported by the plugin. If you need those you will either need to downgrade to Vaadin 13 or run in compatibility mode with Vaadin 14.

I don't think that support will be added either as those browsers are pretty old already.

@johndevs Is there a reason why maven plugin from Vaadin has no problem with generating production mode artifacts for Vaadin 14 compatible with IE ? Why should your gradle plugin exhibit different behavior?

@aoganesi

The decision to not support IE in the future was based on the announcement from Vaadin to drop support as well. The announcement is here https://vaadin.com/blog/vaadin-14-is-the-last-major-version-to-support-ie11.

Adding IE support at this stage when Vaadin will drop support for it in the next version is not really feasible with the resources I have and technically it does not make sense. It would also give a false sense of security for anyone thinking it is now safe to assume IE will be supported in the future and then realize that they cannot upgrade their application any more.

I am open to a pull request though if anyone wants to add the support. However, it needs be done in a way that can be removed when Vaadin 15 is released.

@johndevs Thanks for the explanation. Unfortunately, we don't have enough expertise to provide the pull request. It seems that the only recourse for us is to stop using your plugin and start figuring out how to use the maven plugin from Vaadin. Hopefully there is a way to just call the maven task for transpiling