Old question, but I came across this today looking for the same thing. In the end, adding an external stylesheet is easiest done by simple DOM manipulation:
addImport(url: string): void {
const linkElement = document.createElement('link');
linkElement.rel = 'stylesheet';
linkElement.href = url;
linkElement.id = this.importedFontUrlStyleId;
document.head.appendChild(linkElement);
}
I'm setting this.importedFontUrlStyleId here so later I can remove the stylesheet with
const importedFontSheet = document.head.querySelector(`#${this.importedFontUrlStyleId}`);
if (importedFontSheet) {
document.head.removeChild(importedFontSheet);
}
The security risk of importing a variable stylesheet should be obvious.