Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Platform specific templateUrls result in ERROR in ENOENT: no such file or directory on these. #75

Closed
bnussey opened this issue Feb 10, 2017 · 7 comments · Fixed by #116

Comments

@bnussey
Copy link

bnussey commented Feb 10, 2017

As I understand it, this plugin now correctly identifies platform specific css, so welcome.component.ios.css and welcome.component.android.css will be compiled. However in our project we also have platform specific platform templateUrls, so welcome.component.ios.html and welcome.component.android.html but at present this is resulting in ERROR in ENOENT: no such file or directory on these.

Is it possible to get support in place for platform specific templateUrls?

Thanks

@hdeshev
Copy link
Contributor

hdeshev commented Feb 10, 2017

There are no plans to support platform-specific templates at the moment. There is an easy workaround though: use the <android> and <ios> component tags in your template to separate platform-specific markup.

I know this doesn't sound too good, especially since it requires that you modify your app, but I think we should be focusing our effort and limiting support for "extra" features like this one. The plugin has already grown to be very complex and syncing with every ngtools release is very very painful.

@bnussey
Copy link
Author

bnussey commented Feb 10, 2017

Hey @hdeshev completely understand your position on this.. was just wondering if the same code for styleUrls could be leveraged though to make this quite simple?

@bnussey
Copy link
Author

bnussey commented Apr 13, 2017

Hey @sis0k0 so this has been resolved for templateUrls?

@sis0k0
Copy link
Contributor

sis0k0 commented Apr 13, 2017

Sorry, closed the wrong issue..

@sis0k0 sis0k0 reopened this Apr 13, 2017
@bnussey
Copy link
Author

bnussey commented Apr 13, 2017

No worries, was a bit confused after checking the commits.

For anyone having this same problem, i just created a bash script to automate changing the filenames back and forth. Works great.

@EddyVerbruggen
Copy link
Contributor

EddyVerbruggen commented May 16, 2017

@bnussey I like your workaround, but I'd also rather see this supported out of the box as {N} supports using .ios/.android extensions in view files, so it would be very convenient if webpack plays nice with that convention. Hence I opened PR #155.

@bnussey
Copy link
Author

bnussey commented May 16, 2017

I agree 100% @EddyVerbruggen

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants