question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support optional public base path configuration

See original GitHub issue

Clear 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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
patak-devcommented, Jun 11, 2022

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 using transformIndexHtml.

Also you can check out a related the proposal at

0reactions
sapphi-redcommented, Jul 8, 2022

Closing due to lack of response. Also I believe this is resolved by #8762.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found