File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Expand file tree Collapse file tree 3 files changed +3
-2
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 55
66First, require the polyfill at the entry point of your application
77``` js
8- require ( ' regenerator-runtime/runtime' );
8+ await import ( ' regenerator-runtime/runtime.js ' );
99// or
1010import ' regenerator-runtime/runtime.js' ;
1111```
1212
1313Then, import the library where needed
1414``` js
15- const topologicalSorting = require ( ' @graph-algorithm/topological-sorting' ) ;
15+ const topologicalSorting = await import ( ' @graph-algorithm/topological-sorting' ) ;
1616// or
1717import * as topologicalSorting from ' @graph-algorithm/topological-sorting' ;
1818```
Original file line number Diff line number Diff line change 2222 " topological"
2323 ],
2424 "sideEffects" : false ,
25+ "type" : " module" ,
2526 "source" : " src/index.js" ,
2627 "main" : " dist/index.cjs" ,
2728 "module" : " dist/index.module.js" ,
You can’t perform that action at this time.
0 commit comments