angular2-template-loader icon indicating copy to clipboard operation
angular2-template-loader copied to clipboard

Use with 3rd party component libraries

Open nikolasleblanc opened this issue 9 years ago • 4 comments

Hey @TheLarkInn, quick question for you, we're developing a component library with angular 2 that is then consumed by angular 2 applications.

Is angular2-template-loader capable of digging into the component files of such a library and swapping out its templateUrls and styleUrls just as it does the consuming application, provided everything's getting pulled in by webpack (which it is)?

Let me know if I can clarify my question for you.

Thanks.

nikolasleblanc avatar Nov 14 '16 22:11 nikolasleblanc

It is however the stipulation is that you would need to have the libraries ts src available. This loader should be able to load js transpiled but I have seen issues with this in the past, would be open to merging a PR that supports this.

TheLarkInn avatar Nov 29 '16 13:11 TheLarkInn

Hey, is there a way to use this loader with third party libraries? Or is just a no go for third party libraries with angular? Also I think my opened, now closed, issue #48 shouldn't be closed. Because it's related to this incompatibility with third party libraries with this loader.

I've also made this question in Stackoverflow. http://stackoverflow.com/questions/42816079/webpack-is-not-resolving-extensions-from-third-party-libraries

alvaro9210 avatar Mar 15 '17 17:03 alvaro9210

http://stackoverflow.com/questions/42816079/webpack-is-not-resolving-extensions-from-third-party-libraries/42817176#42817176

Been there, gave you a response in SO.

nikolasleblanc avatar Mar 15 '17 18:03 nikolasleblanc

The answer of @nikolasleblanc works like a charm!! Just take in mind that this wouldn't work with lazy loaded routes in you library.

alvaro9210 avatar Mar 15 '17 23:03 alvaro9210