HTML Imports is deprecated and will be removed in M73

“HTML Imports is deprecated and will be removed in M73, around March 2019. Please use ES modules instead. See https://www.chromestatus.com/features/5144752345317376 for more details.”

Will this be an issue?

This is a good question. In case of Vaadin application I assume there should not be major issues, since webcomponents.js should detect lacking feature and provide a polyfill instead. Of course this needs to be eventually tested and verified.

https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/h-JwMiPUnuU

One issue I see is with the Vaadin @JavaScript annotation
https://vaadin.com/api/platform/13.0.0.alpha1/com/vaadin/flow/component/dependency/JavaScript.html

To be able to use ES modules instead of HTML Imports we would need a way to insert “script” tag with type=“module” attribute
example <script type=“module” …>

Vaadin’s @JavaScript annotation does not provide that.

Any plans on providing that?

Bump! - Just to get updates on this. I’m concerned about my applications breaking because of this.

My understanding is that once HTML imports are deprecated, polyfill provided by webcomponents will kick in.

The application will continue working as so far because the html import has only been implemented by Chrome and other browsers have so far used the webcomponents.js polyfill that will so the work in the future.

ES6 Module support is coming along with NPM and polymer 3. These are targeted for 14 as by the [roadmap]
(https://github.com/orgs/vaadin/projects/1)

Also It looks because of YouTube, The removal of HTML Imports will be most likely postponed to Chrome 75.
https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/h-JwMiPUnuU/KCiheZSeBQAJ

Btw. the removal of native HTML Imports from Chrome was postponed for version 75. Chrome stable is currently already v73.

You can find info about it here: https://groups.google.com/a/chromium.org/d/msg/blink-dev/h-JwMiPUnuU/KCiheZSeBQAJ

And also here: https://www.chromestatus.com/feature/5144752345317376

HTML Imports are deprecated at M70, and will be removed in M75, around Jun 2019.

But other browsers never had this feature and always required the polyfill. Afaik polyfill should still keep working even in Chrome when Chrome drops the native implementation so there’s no hurry to migrate away from HTML imports because of this change.

You can test that it will work by e.g. downloading Chrome Canary and starting it using

--disable-blink-features=HTMLImports

BTW - chrome support in M80