Custom templating in index.html
See original GitHub issueFeature Suggestion
Allow for custom templating in the index.html
that is served by the app plugin.
Possible Implementation
We could pass the rest of app
config because extraneous fields are not removed.
Context
I would like to be able to modify the index.html
by conditionally adding certain script tags. Unfortunately, because of the limited variables passed to the HtmlWebpackPlugin
, I am unable to do so.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
How to Customize an HTML Template - Web Design TutsPlus
It's now time to open up your HTML file for editing. Open the “index.html” file in Sublime Text and you should see something...
Read more >HTML Starter Template – A Basic HTML5 Boilerplate for index ...
This element is the doctype declaration of the HTML file. <!DOCTYPE html> tells the browser to render the HTML codes as HTML5 (as...
Read more >How to Customize an HTML Template | by Hillaryfiverr | Medium
Sometimes you decide to buy an HTML template and customize it by yourself. But when it comes to editing the code, you feel...
Read more >The Content Template element - HTML - MDN Web Docs
The HTML element is a mechanism for holding HTML that is not to be rendered immediately when a page is loaded but may...
Read more >Custom HTML Template | Poi
Custom HTML Template. When you're using JavaScript entrypoints, index.html will be generated from a HTML template file, this is the default ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
A possible way forward here is to power up the
app-backend
plugin a bit and let it template the index file. That’s be the most straightforward place and perhaps least hacky as well. It really wouldn’t need any file rewrites or anything either, just a custom handler.Other options if you want to do this in the deployment end are scripts similar to https://github.com/backstage/backstage/blob/557faeb7e1d1480ae6618ee4068079fec98fb85f/contrib/docker/frontend-with-nginx/docker/inject-config.sh#L5 or perhaps some other flavors of dynamic web servers.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.