Support optional public base path configuration
See original GitHub issueClear and concise description of the problem
Based on the document,
JS-imported asset URLs, CSS url() references, and asset references in your .html files are all automatically adjusted to respect this option during build.
Vite handles all asset references automatically which means inject base
path for all resources in .html
files. I’m facing one situation which is that, in index.html
some resource references are provided by other microservices but in same origin, these resource should not respect the base public path config. I didn’t find a solution to solve this problem.
Suggested solution
Maybe base
can provide a exclusion config or there is a flag we can use to mark these resources to not respect the base public path config.
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that request the same feature to avoid creating a duplicate.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
API Server and Base Path - Swagger
servers replaces the host , basePath and schemes keywords used in OpenAPI 2.0. Each server has an url and an optional Markdown-formatted description...
Read more >public static function PublicStream::basePath - Drupal API
Returns the base path for public://. If we have a setting for the public:// scheme's path, we use that. Otherwise we build a...
Read more >How to SetBasePath in ConfigurationBuilder in Core 2.0
The SetBasePath extension method is defined in Config.FileExtensions. You need to add a reference to the Microsoft.Extensions.Configuration.
Read more >Configuring Your Application - Quarkus
In this guide, we will learn how to configure a Quarkus application. ... MediaType; @Path("/greeting") public class GreetingResource { @GET ...
Read more >Configure optional features for a Dynamics 365 Commerce ...
Under Profile properties, replace the value for the Media Server Base URL property with the media base URL that you created earlier. Select...
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 FreeTop 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
Top GitHub Comments
Maybe the
base
param could accept a function to cover your use case. But I’m unsure if the extra complexity is justified. You could achieve this in user land with a plugin usingtransformIndexHtml
.Also you can check out a related the proposal at
Closing due to lack of response. Also I believe this is resolved by #8762.