How to import HTML template file into JavaScript module

import template from './temlplate.html'; does not work in browser.

It is much easier to develop web applications when HTML templates and JavaScript stay separate. The template of the illustration is borrowed from Human Vectors by Vecteezy.