Closed
Description
Version
4.1.1
Reproduction link
https://github.com/vuejs/vue-cli
Environment info
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
Binaries:
Node: 10.17.0 - ~/.nvm/versions/node/v10.17.0/bin/node
Yarn: 1.19.1 - /usr/local/bin/yarn
npm: 6.11.3 - ~/.nvm/versions/node/v10.17.0/bin/npm
Browsers:
Chrome: 79.0.3945.79
Firefox: 71.0
Safari: 13.0.2
npmPackages:
@vue/babel-helper-vue-jsx-merge-props: 1.0.0
@vue/babel-plugin-transform-vue-jsx: 1.1.2
@vue/babel-preset-app: 4.1.1
@vue/babel-preset-jsx: 1.1.2
@vue/babel-sugar-functional-vue: 1.1.2
@vue/babel-sugar-inject-h: 1.1.2
@vue/babel-sugar-v-model: 1.1.2
@vue/babel-sugar-v-on: 1.1.2
@vue/cli-overlay: 4.1.1
@vue/cli-plugin-babel: ^4.1.0 => 4.1.1
@vue/cli-plugin-eslint: ^4.1.0 => 4.1.1
@vue/cli-plugin-router: ^4.1.0 => 4.1.1
@vue/cli-plugin-typescript: ^4.1.0 => 4.1.1
@vue/cli-plugin-vuex: ^4.1.0 => 4.1.1
@vue/cli-service: ^4.1.0 => 4.1.1
@vue/cli-shared-utils: 4.1.1
@vue/component-compiler-utils: 3.1.0
@vue/eslint-config-prettier: ^5.0.0 => 5.1.0
@vue/eslint-config-typescript: ^4.0.0 => 4.0.0
@vue/preload-webpack-plugin: 1.1.1
@vue/web-component-wrapper: 1.2.0
eslint-plugin-vue: ^5.0.0 => 5.2.3
typescript: ~3.5.3 => 3.5.3
vue: ^2.6.10 => 2.6.11
vue-class-component: ^7.0.2 => 7.1.0
vue-eslint-parser: 5.0.0
vue-hot-reload-api: 2.3.4
vue-loader: 15.7.2
vue-property-decorator: ^8.3.0 => 8.3.0
vue-router: ^3.1.3 => 3.1.3
vue-style-loader: 4.1.2
vue-template-compiler: ^2.6.10 => 2.6.11
vue-template-es2015-compiler: 1.9.1
vuex: ^3.1.2 => 3.1.2
npmGlobalPackages:
@vue/cli: Not Found
Steps to reproduce
i have a vue.config.js
like this:
const publicPath = IS_PROD ? '//qn.cache.***.cn/' : '/'
const assetsDir = IS_PROD ? '${PROJECT_NAME}/admin' : ''
module.exports = {
publicPath,
assetsDir
}
What is expected?
<%= BASE_URL %>favicon.ico
should output favicon.ico
, because i not defined BASE_URL
option (when BASE_URL
not deprecated)
What is actually happening?
<%= BASE_URL %>favicon.ico
output //qn.cache.***.cn/***/admin/favicon.ico
note: I just tried to illustrate the problem with favicon
My company have a common cdn, every project has a identity prefix. in our workflow index.html
need self host, but assetsDir will upload to cdn.
when BASE_URL
not deprecated, i can set publicPath
and assetsDir
to get expected.
so, now how can i do?
Metadata
Metadata
Assignees
Labels
No labels