File tree 3 files changed +3
-2
lines changed
3 files changed +3
-2
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 5
5
6
6
First, require the polyfill at the entry point of your application
7
7
``` js
8
- require ( ' regenerator-runtime/runtime' );
8
+ await import ( ' regenerator-runtime/runtime.js ' );
9
9
// or
10
10
import ' regenerator-runtime/runtime.js' ;
11
11
```
12
12
13
13
Then, import the library where needed
14
14
``` js
15
- const topologicalSorting = require ( ' @graph-algorithm/topological-sorting' ) ;
15
+ const topologicalSorting = await import ( ' @graph-algorithm/topological-sorting' ) ;
16
16
// or
17
17
import * as topologicalSorting from ' @graph-algorithm/topological-sorting' ;
18
18
```
Original file line number Diff line number Diff line change 22
22
" topological"
23
23
],
24
24
"sideEffects" : false ,
25
+ "type" : " module" ,
25
26
"source" : " src/index.js" ,
26
27
"main" : " dist/index.cjs" ,
27
28
"module" : " dist/index.module.js" ,
You can’t perform that action at this time.
0 commit comments