-
Notifications
You must be signed in to change notification settings - Fork 12k
Projects with Declaration=True in tsconfig will not run #1731
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
What are you trying to accomplish by this? |
We have a component library we've been using CLI to maintain since cli version 0.0.34 (i think?). That library has a demo-app that we run locally (and also build/deploy). |
I suspected that. I tried that too, this usecase does not seem to be supported with the webpack based cli anymore. |
But i would also like something like "ng new-lib " to easily build libraries. |
Sure i mean that sounds great but in the mean time the template reference errors seem to be a bug/issue to me especially given that we've been able to chug along with no problems until now with the same approach. I also don't even understand how the 2 correlate (declaration=true & not being able to find the templates using the normal path). There definitely seems to be an issue of SOME kind. |
with webpack you have to require the templates of libraries like so:
Watch that you don't have a |
if you want to create a library you could also just use the cli for generating and testing and then use plain 'ol typescript to build you dist. |
@deebloo I think this is what i'm going to be stuck with for now but it feels like the CLI shouldn't completely break just because we're emitting declarations? Material2 went back to using gulp most likely because of some of the same things i'm running into : angular/components#948 Seems like a step backwards if this new direction is only good for running/deploying when the old direction worked so well for everything? |
It's true that we don't yet support the lib option, but I agree with @randyaa that it shouldn't mean that changing the This seems related to https://github.com/TheLarkInn/angular2-template-loader, can you have a look @TheLarkInn ? |
This is due most likely because of the way awesome-typescript-loader works. TheLarkInn/angular2-template-loader#19 |
I just checked and it seems that adding |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Windows 7
Versions?
Repro steps?
The log given by the failure?
When running
ng serve
the failure looks like:When running
ng build
the directory structure looks like:Mention any other details that might be useful.
changing template references from
to
seems to correct the issue but this doesn't seem right.
The text was updated successfully, but these errors were encountered: