mirror of
https://github.com/iptv-org/epg
synced 2025-12-18 11:27:06 -05:00
Update configLoader.ts
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
import { SiteConfig } from 'epg-grabber'
|
import { SiteConfig } from 'epg-grabber'
|
||||||
import _ from 'lodash'
|
import _ from 'lodash'
|
||||||
|
import { pathToFileURL } from 'url'
|
||||||
|
|
||||||
export class ConfigLoader {
|
export class ConfigLoader {
|
||||||
async load(filepath: string): Promise<SiteConfig> {
|
async load(filepath: string): Promise<SiteConfig> {
|
||||||
const config = (await import(filepath)).default
|
const fileUrl = pathToFileURL(filepath).toString()
|
||||||
|
const config = (await import(fileUrl)).default
|
||||||
|
|
||||||
return _.merge(
|
return _.merge(
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user