lmeijdam / angular-umd-dynamic-example

Angular UMD example of loading new modules dynamically
174 stars 55 forks source link

Question : How to generate the js files in assets at the ng serve / ng build #2

Closed Jerome2606 closed 6 years ago

Jerome2606 commented 6 years ago

Hello,

I see your repo and it's very nice you shared it :)

I'm using SystemJS as well to load my plugins but I can't figure out how to generate the js files from my typescript written plugins.

Please see my stackoverflow question about this: https://stackoverflow.com/questions/52113569/how-to-generate-assets-from-typescript-plugins-in-angular-6

I think you can help me for this point

lmeijdam commented 6 years ago

Hey Jerome,

For the sake of my demo/prototype I manually built the packages using the build-in ngpackagr in Angular 6, ng build 'modulea' and copied the .umd files over to the assets folder myself ;) sure you can create a build script for this to automate this, but that was not something I've put my focus on;) Hope it helps

Jerome2606 commented 6 years ago

How do you define the modulea in angular.json ? Do you have an example :)

lmeijdam commented 6 years ago

With ng generate library modulea

for reference; https://blog.angularindepth.com/creating-a-library-in-angular-6-87799552e7e5

Jerome2606 commented 6 years ago

Thanks, I will take a look at that