-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: deprecate confusing baseUrl
option, use publicPath
instead.
#3143
Conversation
only change in vue.config.js and the same with baseUrl ? |
@IndexXuan |
@sodatea replace baseUrl as publicPath do the same with before ? |
@IndexXuan
|
@sodatea Our product is a service that user upload source code and we build them and publish in CDN and html serve in somewhere. Our CI export PUBLIC_URL so that user not care about that, just use it in build scripts(Vue CLI 3 is vue.config.js#baseUrl before) and CRA user use PUBLIC_URL too. Change baseUrl to publicPath is safely for us ? strongly WANT PUBLIC_URL !!! |
Well, in that case, it’s safe to use |
@sodatea this name change break some Vue CLI 3 plugin which use projectOptions#baseUrl, like: |
@IndexXuan Got it. Will fix it in the next patch. (By making |
In most cases we use
baseUrl
as a way to modifypublicPath
safely.The name
baseUrl
did mislead some people: in some rare cases we want to modify thepublicPath
of static assets while not influencing the page url (#2788). In that case this option does not indicate the base location of the web page but the application bundle,publicPath
would be a better and more common name for it.(One exception is
process.env.BASE_URL
, I'm still wondering if we should rename that env variable too).