TTFLoader imports opentype.js from CDN, causing webpack build error

r185 TTFLoader import from CDN

import {
	FileLoader,
	Loader
} from 'three';
import opentype from 'https://cdn.jsdelivr.net/npm/opentype.js@1.3.4/+esm';

In r184, TTFLoader did not work like this. Why was it changed to import opentype.js from a CDN URL?

This now causes an error in my webpack-based project:

ERROR in external “https://cdn.jsdelivr.net/npm/opentype.js@1.3.4/+esm
The target environment doesn’t support dynamic import() syntax, so it’s not possible to use external type ‘module’ within a script.

Also, I don’t want any library to be loaded from a remote URL at runtime. I would prefer all dependencies to be installed from npm and bundled locally.

Is there a recommended way to make TTFLoader use a local npm dependency instead of importing opentype.js from jsDelivr?