@HtmlImport in Vaadin 14

Hello, @HtmlImport does not work in Vaadin 14. In Vaadin 13 (13.0.12), the following codes successfully load a style change:

@HtmlImport (frontend://styles/shared-styles.html") or
@HtmlImport (“styles/shared-styles.html”)

but not in Vaadin 14 (14.0.7). Would you please know where the problem is?

One of the first things mentioned in the [migration guide from V10-13 to V14]
(https://vaadin.com/docs/v14/flow/v14-migration/v14-migration-guide.html) is that @HtmlImport annotations will be ignored in V14 (npm mode)

The old and the new toolset cannot be used at the same time! This means eg. @HtmlImports are completely ignored when running the project in npm mode, and vice versa @JsModule is ignored when running the project in Vaadin 13 compatibility mode.

So if your html-imported file contains styles (I would guess so from the name shared-styles), you can rewrite that file into an explicit CSS file (remove the html tags wrapping the css code. No more <custom-style><style> insert css code here </style></custom-style>), save it as .css, and move it to your [frontend folder]
(https://stackoverflow.com/a/57553974/3441504).

Now on the view (or component) that used that @HtmlImport you replace that with [@CssImport]
(https://vaadin.com/docs/v14/flow/importing-dependencies/tutorial-include-css.html#using-cssimport)

If the html-imported file contained a polymer template, then you would [upgrade that template to polymer 3]
(https://vaadin.com/docs/v14/flow/v14-migration/v14-migration-guide.html#3-convert-polymer-2-to-polymer-3) and replace the @HtmlImport with [@JsModule]
(https://vaadin.com/docs/v14/flow/v14-migration/v14-migration-guide.html#4-update-java-annotations)