Skip to content

Resources Loader

Загрузчик для Custom Elements. Эмулирует поведение создание script элемента и дожидается регистрации web компонента в dom.

ts
const resources = [
	{
		type: "wc",
		name: "some-wc",
		url: "/path.to.js",
	},
];

Resource

  • type - wc

  • url - Ссылка на загружаемый ресурс

  • options optional - объект с доп опциями для script тега

    • type
    • async
    • defer
    • crossOrigin