0

Working with SystemJS in almost each config Object passed to the SystemJS you ca find 'packageConfigPaths'. In the SystemJS Configuration API documentation there is absolutely no info about this property. Can some one explain what exactly it is doing ? Why there is no documentation on it maybe it is deprecated ?

{ defaultJSExtensions: true, packageConfigPaths: [ '/node_modules/*/package.json', '/node_modules/**/package.json', '/node_modules/@angular/*/package.json' ], ... }

1 Answer 1

1

It allows to have configuration options needed by some package in a separate file, which can be distributed together with the package.

In your example, whenever any package from node_modules needs to be loaded, systemjs will look for package.json file in that package and apply configuration options from that file to the package.

It's not documented probably because it's not considered stable - for example, there were some changes recently in the lookup procedure AFAIR.

Sign up to request clarification or add additional context in comments.

2 Comments

"It allows to have configuration options needed by some package in a separate file, which can be distributed together with the package." - This looks interesting does this means SystemJS config.package options are just small set of properties taken from (package.json) which can be specified in package.json instead ? PS Tnx for the answer :)
Yes, systemjs will take only a subset of options from package.json that it recognizes, I think in most cases main will be the only one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.