File tree Expand file tree Collapse file tree 2 files changed +37
-0
lines changed
libs/nx-angular-mf/src/builders/custom-loader Expand file tree Collapse file tree 2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change
1
+ import { Context , DefaultLoad , NextResolve } from './types' ;
2
+
3
+
4
+ export async function initialize ( { port } : { port : MessagePort } ) {
5
+ port . onmessage = async ( event ) => { } ;
6
+ }
7
+
8
+ export async function resolve (
9
+ specifierInput : string ,
10
+ context : Context ,
11
+ nextResolve : NextResolve
12
+ ) {
13
+ nextResolve ( specifierInput , context , nextResolve ) ;
14
+ }
15
+
16
+ export async function load (
17
+ url : string ,
18
+ context : Context ,
19
+ defaultLoad : DefaultLoad
20
+ ) {
21
+ return defaultLoad ( url , context , defaultLoad ) ;
22
+ }
Original file line number Diff line number Diff line change
1
+ export type Context = {
2
+ parentURL ?: string ;
3
+ } ;
4
+
5
+ export type NextResolve = (
6
+ specifier : string ,
7
+ context : Context ,
8
+ nextResolve : NextResolve
9
+ ) => Promise < string | unknown > ;
10
+
11
+ export type DefaultLoad = (
12
+ specifier : string ,
13
+ context : Context ,
14
+ defaultLoad : DefaultLoad
15
+ ) => Promise < string | unknown > ;
You can’t perform that action at this time.
0 commit comments