I'm trying to include an unpkg link to a particular NPM package 'Angular Calendar' in my system.config.js file so I can run my site on a server without building every time.
I don't know how to find the link. The system.config.js file on the example site of the NPM package shows it referencing npm, which to me means locally. I've tried that and it didnt work.
'angular-calendar': 'npm:[email protected]/dist/umd/angular-calendar.js',
I just get an error saying error loading ... as "angular-calendar"
Any ideas? Am I looking at the problem correctly? I'm trying to run my site on a server, without building. So I need to link to all the dependencies in system.config.js. I don't know how to link to third party packages. I understand that if it's an NPM package, there is an unpgk link. I just don't know how to find it.
Thanks
There is no official way to search for UNPKG packages but there is a third part website https://www.unpkgsearch.com/
You can search for packages and directly copy the unpkg link
There are some more docs on their homepage at https://unpkg.com
To get a specific version:
If I enter the url: https://unpkg.com/[email protected]
It would serve: https://unpkg.com/[email protected]/dist/umd/angular-calendar.js
To get the latest version:
If I enter the url: https://unpkg.com/angular-calendar
It would serve: https://unpkg.com/[email protected]/bundles/angular-calendar.umd.js
To browse the files in a package:
If you append a /
to the url, it will list all the files in the package, ie.
https://unpkg.com/[email protected]/
will list all the files in that particular package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With