Replies: 1 comment
-
I agree with @nightah . If I set base to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It seems that if you pass values that don't strictly conform to the "valid values" for the base config option, during production builds a forward slash
/
is added both before and after said value.For example, if I set
base
to{{.Base}}
theindex.html
will include/{{.Base}}/
before all assets.Coming over from CRA I previously would just set my
%PUBLIC_URL%
to whatever value I desired and this would be output accordingly, though it seems I cannot do that with Vite without an additional step to strip said slashes.Is this behaviour expected and strictly necessary?
In my explicit use case, we add the above value so that our Go backend application can use templating to achieve a dynamic path for our frontend React application.
Beta Was this translation helpful? Give feedback.
All reactions