You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a Vue project, which is embedded to an external page with its own backend. That is why we are using full URL in config.base (ex: config.base = 'https://example.com/static/').
The problem is that we use different environments on different domains (prod, stage servers with different domains) for our application built with Vite.
This means that the application built with the base = 'https://example.com/static' cannot be launched on the sandbox1.example.com domain.
Suggested solution
Before migrating the project to vite, we used vue-cli where webpack provided the ability to set baseUrl on the fly with the js global variable __webpack_public_path__. And for each environment, this variable was initialized in its own way.
Is it possible to make a similar variable that all imports in the application would depend on?
Clear and concise description of the problem
We have a Vue project, which is embedded to an external page with its own backend. That is why we are using full URL in config.base (ex: config.base = 'https://example.com/static/').
The problem is that we use different environments on different domains (prod, stage servers with different domains) for our application built with Vite.
This means that the application built with the base = 'https://example.com/static' cannot be launched on the sandbox1.example.com domain.
Suggested solution
Before migrating the project to vite, we used vue-cli where webpack provided the ability to set baseUrl on the fly with the js global variable
__webpack_public_path__
. And for each environment, this variable was initialized in its own way.Is it possible to make a similar variable that all imports in the application would depend on?
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: