Skip to content

use html-loader instead of raw-loader for html files #5363

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

Closed
indooorsman opened this issue Mar 10, 2017 · 6 comments
Closed

use html-loader instead of raw-loader for html files #5363

indooorsman opened this issue Mar 10, 2017 · 6 comments
Labels
P5 The team acknowledges the request but does not plan to address it, it remains open for discussion

Comments

@indooorsman
Copy link

indooorsman commented Mar 10, 2017

use html-loader instead of raw-loader for html files, so assets referenced in html files can be handled by file-loader correctly

@filipesilva
Copy link
Contributor

We tried that a couple of times and overall we considered it unsafe. Willing to try again though.

@filipesilva filipesilva added P5 The team acknowledges the request but does not plan to address it, it remains open for discussion type: enhancement labels Mar 18, 2017
@mkoczorowski
Copy link

+1
html-loader supports requiring html inside of html files. Feature very useful if we have a large template. If we are allowed to require html in other html files we should be able to break the large template down into smaller, maintainable files.

@kylecordes
Copy link

@mkoczorowski Is it a really good practice though, to have a giant template so big that you need to break into multiple files? When my templates get too big, I decompose components so that each has a tolerable size template.

@mkoczorowski
Copy link

@kylecordes Thanks for replying. I tend to do the same... However, there may be a use case for this. I had to embed a lot of plain html in the page some time ago, without any selectors or logic, just plain html. Creating a @component just to populate templateUrl with plain html it's a bit overkill in my opinion. Why do I need to addon javascript, increase bundle size to just to inject some plain html ? The above option will at least would give you the flexibility. It's always up to the developer what to decide should / should not this be used in a particular instance.

@filipesilva
Copy link
Contributor

Consolidating discussion in #3415

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P5 The team acknowledges the request but does not plan to address it, it remains open for discussion
Projects
None yet
Development

No branches or pull requests

4 participants