microsoft / microsoft/msagljs

CommonJS or AMD dependencies

Open
#60 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
175
Forks
18
Avg merge
6d 3h
Merged PRs (30d)
4

Description

Hello. Just found this library and is awesome. I'm using it in an angular project and I receive the following warnings:

Warning: D:\work\htdocs\hubtalk2-dashboard\node_modules\@msagl\core\dist\layout\layered\layerEdge.js depends on 'typescript-string-operations'. CommonJS or AMD dependencies can cause optimization bailouts.
Warning: D:\work\htdocs\hubtalk2-dashboard\node_modules\@msagl\core\dist\math\geometry\RTree\rectangleNode.js depends on 'stack-typescript'. CommonJS or AMD dependencies can cause optimization bailouts.
Warning: D:\work\htdocs\hubtalk2-dashboard\node_modules\@msagl\core\dist\structs\graph.js depends on 'queue-typescript'. CommonJS or AMD dependencies can cause optimization bailouts.
For more info see: https://angular.io/guide/build#configuring-commonjs-dependencies

I know I can add exceptions for those libraries in angular.json, just wanted to notice this in case you want to move to other libraries that support es6 modules.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the dependency warnings for dist/layout/layered/layerEdge.js, dist/math/geometry/RTree/rectangleNode.js, and dist/structs/graph.js, then inspect the referenced typescript-string-operations, stack-typescript, and queue-typescript packages. Check the Angular CommonJS dependency guidance and angular.json configuration. Done means the library no longer requires those CommonJS or AMD dependency exceptions, if suitable ES6-compatible replacements are identified.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
build-system, frontend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.