| | |
| | | import type {LoaderContext, LoaderCallback} from '..'; |
| | | import type {LoaderContext, LoaderCallback} from '../types'; |
| | | |
| | | import {getResources} from './get-resources'; |
| | | import {injectResources} from './inject-resources'; |
| | |
| | | |
| | | const resources = await getResources(ctx, options); |
| | | |
| | | const content = await injectResources(options, source, resources); |
| | | const content = await injectResources(ctx, options, source, resources); |
| | | |
| | | callback(null, content); |
| | | } catch (err) { |
| | | callback(err); |
| | | } catch (err: unknown) { |
| | | callback(err as Error); |
| | | } |
| | | }; |